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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  19.7k|sip_tokey(struct sipkey *key, const void *src) {
  149|  19.7k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  19.7k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.7k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.7k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.7k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  19.7k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  19.7k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.7k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.7k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.7k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  19.7k|  return key;
  152|  19.7k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  19.7k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  19.7k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  19.7k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  19.7k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  19.7k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  19.7k|sip24_final(struct siphash *H) {
  232|  19.7k|  const char left = (char)(H->p - H->buf);
  233|  19.7k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  19.7k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 19.7k]
  ------------------
  236|  1.23k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.23k, False: 18.4k]
  ------------------
  237|  1.23k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  5.09k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.86k, False: 15.8k]
  ------------------
  240|  5.09k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  6.24k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.14k, False: 18.5k]
  ------------------
  243|  6.24k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  10.1k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.88k, False: 15.8k]
  ------------------
  246|  10.1k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  11.3k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.21k, False: 18.4k]
  ------------------
  249|  11.3k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  14.7k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.44k, False: 16.2k]
  ------------------
  252|  14.7k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  16.0k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.24k, False: 18.4k]
  ------------------
  255|  16.0k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  19.7k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.66k, False: 16.0k]
  ------------------
  258|  19.7k|    break;
  259|  19.7k|  }
  260|       |
  261|  19.7k|  H->v3 ^= b;
  262|  19.7k|  sip_round(H, 2);
  263|  19.7k|  H->v0 ^= b;
  264|  19.7k|  H->v2 ^= 0xff;
  265|  19.7k|  sip_round(H, 4);
  266|       |
  267|  19.7k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  19.7k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  40.2M|sip_round(struct siphash *H, const int rounds) {
  168|  40.2M|  int i;
  169|       |
  170|   120M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 80.6M, False: 40.2M]
  ------------------
  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.2M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  19.7k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  19.7k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  19.7k|  uint64_t m;
  210|       |
  211|  40.2M|  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.7k]
  |  Branch (212:22): [True: 322M, False: 40.2M]
  ------------------
  213|   322M|      *H->p++ = *p++;
  214|       |
  215|  40.2M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  40.2M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 16.0k, False: 40.2M]
  ------------------
  216|  16.0k|      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.7k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  19.7k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  19.7k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  19.7k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  19.7k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  19.7k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  19.7k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  19.7k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  19.7k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  19.7k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  19.7k|  H->p = H->buf;
  199|  19.7k|  H->c = 0;
  200|       |
  201|  19.7k|  return H;
  202|  19.7k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  3.55M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  3.55M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  3.55M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  3.55M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  3.55M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  3.55M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  3.55M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  3.55M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  3.55M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  3.55M|  H->p = H->buf;
  199|  3.55M|  H->c = 0;
  200|       |
  201|  3.55M|  return H;
  202|  3.55M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  3.55M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  3.55M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  3.55M|  uint64_t m;
  210|       |
  211|  4.10M|  do {
  212|  12.2M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  8.69M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 8.69M, False: 3.55M]
  |  Branch (212:22): [True: 8.15M, False: 546k]
  ------------------
  213|  8.15M|      *H->p++ = *p++;
  214|       |
  215|  4.10M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  4.10M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 3.55M, False: 549k]
  ------------------
  216|  3.55M|      break;
  217|       |
  218|   549k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   549k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   549k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   549k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   549k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   549k|    H->v3 ^= m;
  220|   549k|    sip_round(H, 2);
  221|   549k|    H->v0 ^= m;
  222|       |
  223|   549k|    H->p = H->buf;
  224|   549k|    H->c += 8;
  225|   549k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 546k, False: 3.08k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  3.55M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  7.66M|sip_round(struct siphash *H, const int rounds) {
  168|  7.66M|  int i;
  169|       |
  170|  30.1M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 22.4M, False: 7.66M]
  ------------------
  171|  22.4M|    H->v0 += H->v1;
  172|  22.4M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  22.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  22.4M|    H->v1 ^= H->v0;
  174|  22.4M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  22.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  22.4M|    H->v2 += H->v3;
  177|  22.4M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  22.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  22.4M|    H->v3 ^= H->v2;
  179|       |
  180|  22.4M|    H->v0 += H->v3;
  181|  22.4M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  22.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  22.4M|    H->v3 ^= H->v0;
  183|       |
  184|  22.4M|    H->v2 += H->v1;
  185|  22.4M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  22.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  22.4M|    H->v1 ^= H->v2;
  187|  22.4M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  22.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  22.4M|  }
  189|  7.66M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  3.55M|sip24_final(struct siphash *H) {
  232|  3.55M|  const char left = (char)(H->p - H->buf);
  233|  3.55M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  3.55M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 3.55M]
  ------------------
  236|  3.09k|  case 7:
  ------------------
  |  Branch (236:3): [True: 3.09k, False: 3.55M]
  ------------------
  237|  3.09k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  10.5k|  case 6:
  ------------------
  |  Branch (239:3): [True: 7.43k, False: 3.55M]
  ------------------
  240|  10.5k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  17.9k|  case 5:
  ------------------
  |  Branch (242:3): [True: 7.37k, False: 3.55M]
  ------------------
  243|  17.9k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  28.8k|  case 4:
  ------------------
  |  Branch (245:3): [True: 10.9k, False: 3.54M]
  ------------------
  246|  28.8k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  44.4k|  case 3:
  ------------------
  |  Branch (248:3): [True: 15.5k, False: 3.54M]
  ------------------
  249|  44.4k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  96.4k|  case 2:
  ------------------
  |  Branch (251:3): [True: 51.9k, False: 3.50M]
  ------------------
  252|  96.4k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  3.55M|  case 1:
  ------------------
  |  Branch (254:3): [True: 3.45M, False: 100k]
  ------------------
  255|  3.55M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  3.55M|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.65k, False: 3.55M]
  ------------------
  258|  3.55M|    break;
  259|  3.55M|  }
  260|       |
  261|  3.55M|  H->v3 ^= b;
  262|  3.55M|  sip_round(H, 2);
  263|  3.55M|  H->v0 ^= b;
  264|  3.55M|  H->v2 ^= 0xff;
  265|  3.55M|  sip_round(H, 4);
  266|       |
  267|  3.55M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  3.55M|} /* sip24_final() */

XML_ParserCreate:
  719|  19.7k|XML_ParserCreate(const XML_Char *encodingName) {
  720|  19.7k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  721|  19.7k|}
XML_ParserCreate_MM:
  970|  19.7k|                    const XML_Char *nameSep) {
  971|  19.7k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  972|  19.7k|}
XML_ParserFree:
 1441|  19.7k|XML_ParserFree(XML_Parser parser) {
 1442|  19.7k|  TAG *tagList;
 1443|  19.7k|  OPEN_INTERNAL_ENTITY *entityList;
 1444|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (1444:7): [True: 0, False: 19.7k]
  ------------------
 1445|      0|    return;
 1446|       |  /* free m_tagStack and m_freeTagList */
 1447|  19.7k|  tagList = parser->m_tagStack;
 1448|  2.64M|  for (;;) {
 1449|  2.64M|    TAG *p;
 1450|  2.64M|    if (tagList == NULL) {
  ------------------
  |  Branch (1450:9): [True: 19.9k, False: 2.62M]
  ------------------
 1451|  19.9k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1451:11): [True: 19.7k, False: 248]
  ------------------
 1452|  19.7k|        break;
 1453|    248|      tagList = parser->m_freeTagList;
 1454|    248|      parser->m_freeTagList = NULL;
 1455|    248|    }
 1456|  2.62M|    p = tagList;
 1457|  2.62M|    tagList = tagList->parent;
 1458|  2.62M|    FREE(parser, p->buf);
  ------------------
  |  |  716|  2.62M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1459|  2.62M|    destroyBindings(p->bindings, parser);
 1460|  2.62M|    FREE(parser, p);
  ------------------
  |  |  716|  2.62M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1461|  2.62M|  }
 1462|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1463|  19.7k|  entityList = parser->m_openInternalEntities;
 1464|  21.3k|  for (;;) {
 1465|  21.3k|    OPEN_INTERNAL_ENTITY *openEntity;
 1466|  21.3k|    if (entityList == NULL) {
  ------------------
  |  Branch (1466:9): [True: 20.3k, False: 1.03k]
  ------------------
 1467|  20.3k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1467:11): [True: 19.7k, False: 626]
  ------------------
 1468|  19.7k|        break;
 1469|    626|      entityList = parser->m_freeInternalEntities;
 1470|    626|      parser->m_freeInternalEntities = NULL;
 1471|    626|    }
 1472|  1.65k|    openEntity = entityList;
 1473|  1.65k|    entityList = entityList->next;
 1474|  1.65k|    FREE(parser, openEntity);
  ------------------
  |  |  716|  1.65k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1475|  1.65k|  }
 1476|       |
 1477|  19.7k|  destroyBindings(parser->m_freeBindingList, parser);
 1478|  19.7k|  destroyBindings(parser->m_inheritedBindings, parser);
 1479|  19.7k|  poolDestroy(&parser->m_tempPool);
 1480|  19.7k|  poolDestroy(&parser->m_temp2Pool);
 1481|  19.7k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  716|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1482|  19.7k|#ifdef XML_DTD
 1483|       |  /* external parameter entity parsers share the DTD structure
 1484|       |     parser->m_dtd with the root parser, so we must not destroy it
 1485|       |  */
 1486|  19.7k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1486:7): [True: 19.7k, False: 0]
  |  Branch (1486:36): [True: 19.7k, False: 0]
  ------------------
 1487|       |#else
 1488|       |  if (parser->m_dtd)
 1489|       |#endif /* XML_DTD */
 1490|  19.7k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1491|  19.7k|               &parser->m_mem);
 1492|  19.7k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  716|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1493|       |#ifdef XML_ATTR_INFO
 1494|       |  FREE(parser, (void *)parser->m_attInfo);
 1495|       |#endif
 1496|  19.7k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  716|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  19.7k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  19.7k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  19.7k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  716|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  19.7k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  716|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1501|  19.7k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1501:7): [True: 0, False: 19.7k]
  ------------------
 1502|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1503|  19.7k|  FREE(parser, parser);
  ------------------
  |  |  716|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1504|  19.7k|}
XML_SetElementHandler:
 1596|  19.7k|                      XML_EndElementHandler end) {
 1597|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (1597:7): [True: 0, False: 19.7k]
  ------------------
 1598|      0|    return;
 1599|  19.7k|  parser->m_startElementHandler = start;
 1600|  19.7k|  parser->m_endElementHandler = end;
 1601|  19.7k|}
XML_SetHashSalt:
 1816|  19.7k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1817|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (1817:7): [True: 0, False: 19.7k]
  ------------------
 1818|      0|    return 0;
 1819|  19.7k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1819:7): [True: 0, False: 19.7k]
  ------------------
 1820|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1821|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1822|  19.7k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1822:7): [True: 0, False: 19.7k]
  ------------------
 1823|  19.7k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1823:10): [True: 0, False: 19.7k]
  ------------------
 1824|      0|    return 0;
 1825|  19.7k|  parser->m_hash_secret_salt = hash_salt;
 1826|  19.7k|  return 1;
 1827|  19.7k|}
XML_ParseBuffer:
 1984|  19.7k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1985|  19.7k|  const char *start;
 1986|  19.7k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  19.7k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1987|       |
 1988|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (1988:7): [True: 0, False: 19.7k]
  ------------------
 1989|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1990|  19.7k|  switch (parser->m_parsingStatus.parsing) {
 1991|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1991:3): [True: 0, False: 19.7k]
  ------------------
 1992|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1993|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1994|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1994:3): [True: 0, False: 19.7k]
  ------------------
 1995|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1996|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1997|  19.7k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1997:3): [True: 19.7k, False: 0]
  ------------------
 1998|       |    /* Has someone called XML_GetBuffer successfully before? */
 1999|  19.7k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1999:9): [True: 0, False: 19.7k]
  ------------------
 2000|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2001|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2002|      0|    }
 2003|       |
 2004|  19.7k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2004:9): [True: 19.7k, False: 0]
  |  Branch (2004:43): [True: 0, False: 19.7k]
  ------------------
 2005|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2006|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2007|      0|    }
 2008|       |    /* fall through */
 2009|  19.7k|  default:
  ------------------
  |  Branch (2009:3): [True: 0, False: 19.7k]
  ------------------
 2010|  19.7k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2011|  19.7k|  }
 2012|       |
 2013|  19.7k|  start = parser->m_bufferPtr;
 2014|  19.7k|  parser->m_positionPtr = start;
 2015|  19.7k|  parser->m_bufferEnd += len;
 2016|  19.7k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2017|  19.7k|  parser->m_parseEndByteIndex += len;
 2018|  19.7k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2019|       |
 2020|  19.7k|  parser->m_errorCode = parser->m_processor(
 2021|  19.7k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2022|       |
 2023|  19.7k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2023:7): [True: 7.99k, False: 11.7k]
  ------------------
 2024|  7.99k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2025|  7.99k|    parser->m_processor = errorProcessor;
 2026|  7.99k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  7.99k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2027|  11.7k|  } else {
 2028|  11.7k|    switch (parser->m_parsingStatus.parsing) {
 2029|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2029:5): [True: 0, False: 11.7k]
  ------------------
 2030|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2031|      0|      break;
 2032|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2032:5): [True: 0, False: 11.7k]
  ------------------
 2033|  11.7k|    case XML_PARSING:
  ------------------
  |  Branch (2033:5): [True: 11.7k, False: 0]
  ------------------
 2034|  11.7k|      if (isFinal) {
  ------------------
  |  Branch (2034:11): [True: 0, False: 11.7k]
  ------------------
 2035|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2036|      0|        return result;
 2037|      0|      }
 2038|  11.7k|    default:; /* should not happen */
  ------------------
  |  Branch (2038:5): [True: 0, False: 11.7k]
  ------------------
 2039|  11.7k|    }
 2040|  11.7k|  }
 2041|       |
 2042|  11.7k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  11.7k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2043|  11.7k|                    parser->m_bufferPtr, &parser->m_position);
 2044|  11.7k|  parser->m_positionPtr = parser->m_bufferPtr;
 2045|  11.7k|  return result;
 2046|  19.7k|}
XML_GetBuffer:
 2049|  19.7k|XML_GetBuffer(XML_Parser parser, int len) {
 2050|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (2050:7): [True: 0, False: 19.7k]
  ------------------
 2051|      0|    return NULL;
 2052|  19.7k|  if (len < 0) {
  ------------------
  |  Branch (2052:7): [True: 0, False: 19.7k]
  ------------------
 2053|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2054|      0|    return NULL;
 2055|      0|  }
 2056|  19.7k|  switch (parser->m_parsingStatus.parsing) {
 2057|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2057:3): [True: 0, False: 19.7k]
  ------------------
 2058|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2059|      0|    return NULL;
 2060|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2060:3): [True: 0, False: 19.7k]
  ------------------
 2061|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2062|      0|    return NULL;
 2063|  19.7k|  default:;
  ------------------
  |  Branch (2063:3): [True: 19.7k, False: 0]
  ------------------
 2064|  19.7k|  }
 2065|       |
 2066|  19.7k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  200|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.7k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2066:7): [True: 19.7k, False: 0]
  ------------------
 2067|  19.7k|#ifdef XML_CONTEXT_BYTES
 2068|  19.7k|    int keep;
 2069|  19.7k|#endif /* defined XML_CONTEXT_BYTES */
 2070|       |    /* Do not invoke signed arithmetic overflow: */
 2071|  19.7k|    int neededSize = (int)((unsigned)len
 2072|  19.7k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  200|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.7k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2073|  19.7k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2074|  19.7k|    if (neededSize < 0) {
  ------------------
  |  Branch (2074:9): [True: 0, False: 19.7k]
  ------------------
 2075|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2076|      0|      return NULL;
 2077|      0|    }
 2078|  19.7k|#ifdef XML_CONTEXT_BYTES
 2079|  19.7k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  200|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.7k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2080|  19.7k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   98|  19.7k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2080:9): [True: 0, False: 19.7k]
  ------------------
 2081|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   98|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2082|       |    /* Detect and prevent integer overflow */
 2083|  19.7k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2083:9): [True: 0, False: 19.7k]
  ------------------
 2084|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2085|      0|      return NULL;
 2086|      0|    }
 2087|  19.7k|    neededSize += keep;
 2088|  19.7k|#endif /* defined XML_CONTEXT_BYTES */
 2089|  19.7k|    if (neededSize
  ------------------
  |  Branch (2089:9): [True: 0, False: 19.7k]
  ------------------
 2090|  19.7k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  200|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.7k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2091|      0|#ifdef XML_CONTEXT_BYTES
 2092|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2092:11): [True: 0, False: 0]
  ------------------
 2093|      0|        int offset
 2094|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2095|      0|              - keep;
 2096|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2097|       |         * in the buffer */
 2098|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2099|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2100|      0|        parser->m_bufferEnd -= offset;
 2101|      0|        parser->m_bufferPtr -= offset;
 2102|      0|      }
 2103|       |#else
 2104|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2105|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2106|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2107|       |        parser->m_bufferEnd
 2108|       |            = parser->m_buffer
 2109|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2110|       |        parser->m_bufferPtr = parser->m_buffer;
 2111|       |      }
 2112|       |#endif /* not defined XML_CONTEXT_BYTES */
 2113|  19.7k|    } else {
 2114|  19.7k|      char *newBuf;
 2115|  19.7k|      int bufferSize
 2116|  19.7k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  200|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.7k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2117|  19.7k|      if (bufferSize == 0)
  ------------------
  |  Branch (2117:11): [True: 19.7k, False: 0]
  ------------------
 2118|  19.7k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  247|  19.7k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2119|  30.7k|      do {
 2120|       |        /* Do not invoke signed arithmetic overflow: */
 2121|  30.7k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2122|  30.7k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2122:16): [True: 11.0k, False: 19.7k]
  |  Branch (2122:43): [True: 11.0k, False: 0]
  ------------------
 2123|  19.7k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2123:11): [True: 0, False: 19.7k]
  ------------------
 2124|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2125|      0|        return NULL;
 2126|      0|      }
 2127|  19.7k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  714|  19.7k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2128|  19.7k|      if (newBuf == 0) {
  ------------------
  |  Branch (2128:11): [True: 0, False: 19.7k]
  ------------------
 2129|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2130|      0|        return NULL;
 2131|      0|      }
 2132|  19.7k|      parser->m_bufferLim = newBuf + bufferSize;
 2133|  19.7k|#ifdef XML_CONTEXT_BYTES
 2134|  19.7k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2134:11): [True: 0, False: 19.7k]
  ------------------
 2135|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2136|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2137|      0|                   + keep);
 2138|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2139|      0|        parser->m_buffer = newBuf;
 2140|      0|        parser->m_bufferEnd
 2141|      0|            = parser->m_buffer
 2142|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2143|      0|              + keep;
 2144|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2145|  19.7k|      } else {
 2146|       |        /* This must be a brand new buffer with no data in it yet */
 2147|  19.7k|        parser->m_bufferEnd = newBuf;
 2148|  19.7k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2149|  19.7k|      }
 2150|       |#else
 2151|       |      if (parser->m_bufferPtr) {
 2152|       |        memcpy(newBuf, parser->m_bufferPtr,
 2153|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2154|       |        FREE(parser, parser->m_buffer);
 2155|       |        parser->m_bufferEnd
 2156|       |            = newBuf
 2157|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2158|       |      } else {
 2159|       |        /* This must be a brand new buffer with no data in it yet */
 2160|       |        parser->m_bufferEnd = newBuf;
 2161|       |      }
 2162|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2163|       |#endif /* not defined XML_CONTEXT_BYTES */
 2164|  19.7k|    }
 2165|  19.7k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2166|  19.7k|    parser->m_positionPtr = NULL;
 2167|  19.7k|  }
 2168|  19.7k|  return parser->m_bufferEnd;
 2169|  19.7k|}
xmlparse.c:parserCreate:
  977|  19.7k|             DTD *dtd) {
  978|  19.7k|  XML_Parser parser;
  979|       |
  980|  19.7k|  if (memsuite) {
  ------------------
  |  Branch (980:7): [True: 0, False: 19.7k]
  ------------------
  981|      0|    XML_Memory_Handling_Suite *mtemp;
  982|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  983|      0|    if (parser != NULL) {
  ------------------
  |  Branch (983:9): [True: 0, False: 0]
  ------------------
  984|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  985|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  986|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  987|      0|      mtemp->free_fcn = memsuite->free_fcn;
  988|      0|    }
  989|  19.7k|  } else {
  990|  19.7k|    XML_Memory_Handling_Suite *mtemp;
  991|  19.7k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  992|  19.7k|    if (parser != NULL) {
  ------------------
  |  Branch (992:9): [True: 19.7k, False: 0]
  ------------------
  993|  19.7k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  994|  19.7k|      mtemp->malloc_fcn = malloc;
  995|  19.7k|      mtemp->realloc_fcn = realloc;
  996|  19.7k|      mtemp->free_fcn = free;
  997|  19.7k|    }
  998|  19.7k|  }
  999|       |
 1000|  19.7k|  if (! parser)
  ------------------
  |  Branch (1000:7): [True: 0, False: 19.7k]
  ------------------
 1001|      0|    return parser;
 1002|       |
 1003|  19.7k|  parser->m_buffer = NULL;
 1004|  19.7k|  parser->m_bufferLim = NULL;
 1005|       |
 1006|  19.7k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  244|  19.7k|#define INIT_ATTS_SIZE 16
  ------------------
 1007|  19.7k|  parser->m_atts
 1008|  19.7k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  714|  19.7k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1009|  19.7k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1009:7): [True: 0, False: 19.7k]
  ------------------
 1010|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1011|      0|    return NULL;
 1012|      0|  }
 1013|       |#ifdef XML_ATTR_INFO
 1014|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1015|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1016|       |  if (parser->m_attInfo == NULL) {
 1017|       |    FREE(parser, parser->m_atts);
 1018|       |    FREE(parser, parser);
 1019|       |    return NULL;
 1020|       |  }
 1021|       |#endif
 1022|  19.7k|  parser->m_dataBuf
 1023|  19.7k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  714|  19.7k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1024|  19.7k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1024:7): [True: 0, False: 19.7k]
  ------------------
 1025|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1026|       |#ifdef XML_ATTR_INFO
 1027|       |    FREE(parser, parser->m_attInfo);
 1028|       |#endif
 1029|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1030|      0|    return NULL;
 1031|      0|  }
 1032|  19.7k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  243|  19.7k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1033|       |
 1034|  19.7k|  if (dtd)
  ------------------
  |  Branch (1034:7): [True: 0, False: 19.7k]
  ------------------
 1035|      0|    parser->m_dtd = dtd;
 1036|  19.7k|  else {
 1037|  19.7k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1038|  19.7k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1038:9): [True: 0, False: 19.7k]
  ------------------
 1039|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1041|       |#ifdef XML_ATTR_INFO
 1042|       |      FREE(parser, parser->m_attInfo);
 1043|       |#endif
 1044|      0|      FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1045|      0|      return NULL;
 1046|      0|    }
 1047|  19.7k|  }
 1048|       |
 1049|  19.7k|  parser->m_freeBindingList = NULL;
 1050|  19.7k|  parser->m_freeTagList = NULL;
 1051|  19.7k|  parser->m_freeInternalEntities = NULL;
 1052|       |
 1053|  19.7k|  parser->m_groupSize = 0;
 1054|  19.7k|  parser->m_groupConnector = NULL;
 1055|       |
 1056|  19.7k|  parser->m_unknownEncodingHandler = NULL;
 1057|  19.7k|  parser->m_unknownEncodingHandlerData = NULL;
 1058|       |
 1059|  19.7k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  19.7k|#define ASCII_EXCL 0x21
  ------------------
 1060|  19.7k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|  19.7k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1062|       |
 1063|  19.7k|  parser->m_nsAtts = NULL;
 1064|  19.7k|  parser->m_nsAttsVersion = 0;
 1065|  19.7k|  parser->m_nsAttsPower = 0;
 1066|       |
 1067|  19.7k|  parser->m_protocolEncodingName = NULL;
 1068|       |
 1069|  19.7k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1070|  19.7k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1071|  19.7k|  parserInit(parser, encodingName);
 1072|       |
 1073|  19.7k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1073:7): [True: 19.7k, False: 0]
  |  Branch (1073:23): [True: 0, False: 19.7k]
  ------------------
 1074|      0|    if (dtd) {
  ------------------
  |  Branch (1074:9): [True: 0, False: 0]
  ------------------
 1075|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1076|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1077|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1078|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1079|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1080|      0|      parser->m_dtd = NULL;
 1081|      0|    }
 1082|      0|    XML_ParserFree(parser);
 1083|      0|    return NULL;
 1084|      0|  }
 1085|       |
 1086|  19.7k|  if (nameSep) {
  ------------------
  |  Branch (1086:7): [True: 0, False: 19.7k]
  ------------------
 1087|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1088|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  163|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1089|      0|    parser->m_namespaceSeparator = *nameSep;
 1090|  19.7k|  } else {
 1091|  19.7k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  162|  19.7k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1092|  19.7k|  }
 1093|       |
 1094|  19.7k|  return parser;
 1095|  19.7k|}
xmlparse.c:dtdCreate:
 6716|  19.7k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6717|  19.7k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6718|  19.7k|  if (p == NULL)
  ------------------
  |  Branch (6718:7): [True: 0, False: 19.7k]
  ------------------
 6719|      0|    return p;
 6720|  19.7k|  poolInit(&(p->pool), ms);
 6721|  19.7k|  poolInit(&(p->entityValuePool), ms);
 6722|  19.7k|  hashTableInit(&(p->generalEntities), ms);
 6723|  19.7k|  hashTableInit(&(p->elementTypes), ms);
 6724|  19.7k|  hashTableInit(&(p->attributeIds), ms);
 6725|  19.7k|  hashTableInit(&(p->prefixes), ms);
 6726|  19.7k|#ifdef XML_DTD
 6727|  19.7k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6728|  19.7k|  hashTableInit(&(p->paramEntities), ms);
 6729|  19.7k|#endif /* XML_DTD */
 6730|  19.7k|  p->defaultPrefix.name = NULL;
 6731|  19.7k|  p->defaultPrefix.binding = NULL;
 6732|       |
 6733|  19.7k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6734|  19.7k|  p->scaffIndex = NULL;
 6735|  19.7k|  p->scaffold = NULL;
 6736|  19.7k|  p->scaffLevel = 0;
 6737|  19.7k|  p->scaffSize = 0;
 6738|  19.7k|  p->scaffCount = 0;
 6739|  19.7k|  p->contentStringLen = 0;
 6740|       |
 6741|  19.7k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  19.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6742|  19.7k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  19.7k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6744|  19.7k|  return p;
 6745|  19.7k|}
xmlparse.c:hashTableInit:
 7150|  98.5k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7151|  98.5k|  p->power = 0;
 7152|  98.5k|  p->size = 0;
 7153|  98.5k|  p->used = 0;
 7154|  98.5k|  p->v = NULL;
 7155|  98.5k|  p->mem = ms;
 7156|  98.5k|}
xmlparse.c:poolInit:
 7175|  78.8k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7176|  78.8k|  pool->blocks = NULL;
 7177|  78.8k|  pool->freeBlocks = NULL;
 7178|  78.8k|  pool->start = NULL;
 7179|  78.8k|  pool->ptr = NULL;
 7180|  78.8k|  pool->end = NULL;
 7181|  78.8k|  pool->mem = ms;
 7182|  78.8k|}
xmlparse.c:parserInit:
 1098|  19.7k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1099|  19.7k|  parser->m_processor = prologInitProcessor;
 1100|  19.7k|  XmlPrologStateInit(&parser->m_prologState);
 1101|  19.7k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1101:7): [True: 19.7k, False: 0]
  ------------------
 1102|  19.7k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1103|  19.7k|  }
 1104|  19.7k|  parser->m_curBase = NULL;
 1105|  19.7k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1106|  19.7k|  parser->m_userData = NULL;
 1107|  19.7k|  parser->m_handlerArg = NULL;
 1108|  19.7k|  parser->m_startElementHandler = NULL;
 1109|  19.7k|  parser->m_endElementHandler = NULL;
 1110|  19.7k|  parser->m_characterDataHandler = NULL;
 1111|  19.7k|  parser->m_processingInstructionHandler = NULL;
 1112|  19.7k|  parser->m_commentHandler = NULL;
 1113|  19.7k|  parser->m_startCdataSectionHandler = NULL;
 1114|  19.7k|  parser->m_endCdataSectionHandler = NULL;
 1115|  19.7k|  parser->m_defaultHandler = NULL;
 1116|  19.7k|  parser->m_startDoctypeDeclHandler = NULL;
 1117|  19.7k|  parser->m_endDoctypeDeclHandler = NULL;
 1118|  19.7k|  parser->m_unparsedEntityDeclHandler = NULL;
 1119|  19.7k|  parser->m_notationDeclHandler = NULL;
 1120|  19.7k|  parser->m_startNamespaceDeclHandler = NULL;
 1121|  19.7k|  parser->m_endNamespaceDeclHandler = NULL;
 1122|  19.7k|  parser->m_notStandaloneHandler = NULL;
 1123|  19.7k|  parser->m_externalEntityRefHandler = NULL;
 1124|  19.7k|  parser->m_externalEntityRefHandlerArg = parser;
 1125|  19.7k|  parser->m_skippedEntityHandler = NULL;
 1126|  19.7k|  parser->m_elementDeclHandler = NULL;
 1127|  19.7k|  parser->m_attlistDeclHandler = NULL;
 1128|  19.7k|  parser->m_entityDeclHandler = NULL;
 1129|  19.7k|  parser->m_xmlDeclHandler = NULL;
 1130|  19.7k|  parser->m_bufferPtr = parser->m_buffer;
 1131|  19.7k|  parser->m_bufferEnd = parser->m_buffer;
 1132|  19.7k|  parser->m_parseEndByteIndex = 0;
 1133|  19.7k|  parser->m_parseEndPtr = NULL;
 1134|  19.7k|  parser->m_declElementType = NULL;
 1135|  19.7k|  parser->m_declAttributeId = NULL;
 1136|  19.7k|  parser->m_declEntity = NULL;
 1137|  19.7k|  parser->m_doctypeName = NULL;
 1138|  19.7k|  parser->m_doctypeSysid = NULL;
 1139|  19.7k|  parser->m_doctypePubid = NULL;
 1140|  19.7k|  parser->m_declAttributeType = NULL;
 1141|  19.7k|  parser->m_declNotationName = NULL;
 1142|  19.7k|  parser->m_declNotationPublicId = NULL;
 1143|  19.7k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  19.7k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1145|  19.7k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1146|  19.7k|  parser->m_errorCode = XML_ERROR_NONE;
 1147|  19.7k|  parser->m_eventPtr = NULL;
 1148|  19.7k|  parser->m_eventEndPtr = NULL;
 1149|  19.7k|  parser->m_positionPtr = NULL;
 1150|  19.7k|  parser->m_openInternalEntities = NULL;
 1151|  19.7k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  19.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1152|  19.7k|  parser->m_tagLevel = 0;
 1153|  19.7k|  parser->m_tagStack = NULL;
 1154|  19.7k|  parser->m_inheritedBindings = NULL;
 1155|  19.7k|  parser->m_nSpecifiedAtts = 0;
 1156|  19.7k|  parser->m_unknownEncodingMem = NULL;
 1157|  19.7k|  parser->m_unknownEncodingRelease = NULL;
 1158|  19.7k|  parser->m_unknownEncodingData = NULL;
 1159|  19.7k|  parser->m_parentParser = NULL;
 1160|  19.7k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1161|  19.7k|#ifdef XML_DTD
 1162|  19.7k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  19.7k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1164|  19.7k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1165|  19.7k|#endif
 1166|  19.7k|  parser->m_hash_secret_salt = 0;
 1167|       |
 1168|  19.7k|#ifdef XML_DTD
 1169|  19.7k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1170|  19.7k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1171|  19.7k|  parser->m_accounting.maximumAmplificationFactor
 1172|  19.7k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  19.7k|  100.0f
  ------------------
 1173|  19.7k|  parser->m_accounting.activationThresholdBytes
 1174|  19.7k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  19.7k|  8388608 // 8 MiB, 2^23
  ------------------
 1175|       |
 1176|  19.7k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1177|  19.7k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1178|  19.7k|#endif
 1179|  19.7k|}
xmlparse.c:prologInitProcessor:
 4406|  19.7k|                    const char **nextPtr) {
 4407|  19.7k|  enum XML_Error result = initializeEncoding(parser);
 4408|  19.7k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4408:7): [True: 0, False: 19.7k]
  ------------------
 4409|      0|    return result;
 4410|  19.7k|  parser->m_processor = prologProcessor;
 4411|  19.7k|  return prologProcessor(parser, s, end, nextPtr);
 4412|  19.7k|}
xmlparse.c:initializeEncoding:
 4249|  19.7k|initializeEncoding(XML_Parser parser) {
 4250|  19.7k|  const char *s;
 4251|       |#ifdef XML_UNICODE
 4252|       |  char encodingBuf[128];
 4253|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4254|       |  if (! parser->m_protocolEncodingName)
 4255|       |    s = NULL;
 4256|       |  else {
 4257|       |    int i;
 4258|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4259|       |      if (i == sizeof(encodingBuf) - 1
 4260|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4261|       |        encodingBuf[0] = '\0';
 4262|       |        break;
 4263|       |      }
 4264|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4265|       |    }
 4266|       |    encodingBuf[i] = '\0';
 4267|       |    s = encodingBuf;
 4268|       |  }
 4269|       |#else
 4270|  19.7k|  s = parser->m_protocolEncodingName;
 4271|  19.7k|#endif
 4272|  19.7k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4272:7): [True: 19.7k, False: 0]
  |  Branch (4272:8): [True: 0, False: 19.7k]
  ------------------
 4273|  19.7k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4274|  19.7k|    return XML_ERROR_NONE;
 4275|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4276|  19.7k|}
xmlparse.c:prologProcessor:
 4606|  19.7k|                const char **nextPtr) {
 4607|  19.7k|  const char *next = s;
 4608|  19.7k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  19.7k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  19.7k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4609|  19.7k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4610|  19.7k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  19.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4611|  19.7k|                  XML_ACCOUNT_DIRECT);
 4612|  19.7k|}
xmlparse.c:doProlog:
 4617|  19.7k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4618|  19.7k|#ifdef XML_DTD
 4619|  19.7k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  19.7k|#define ASCII_HASH 0x23
  ------------------
 4620|  19.7k|#endif /* XML_DTD */
 4621|  19.7k|  static const XML_Char atypeCDATA[]
 4622|  19.7k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  19.7k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  19.7k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.7k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.7k|#define ASCII_A 0x41
  ------------------
 4623|  19.7k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  19.7k|#define ASCII_D 0x44
  ------------------
 4624|  19.7k|  static const XML_Char atypeIDREF[]
 4625|  19.7k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  19.7k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  19.7k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  19.7k|#define ASCII_F 0x46
  ------------------
 4626|  19.7k|  static const XML_Char atypeIDREFS[]
 4627|  19.7k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  19.7k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  19.7k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  19.7k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.7k|#define ASCII_S 0x53
  ------------------
 4628|  19.7k|  static const XML_Char atypeENTITY[]
 4629|  19.7k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  19.7k|#define ASCII_Y 0x59
  ------------------
 4630|  19.7k|  static const XML_Char atypeENTITIES[]
 4631|  19.7k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
 4632|  19.7k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.7k|#define ASCII_S 0x53
  ------------------
 4633|  19.7k|  static const XML_Char atypeNMTOKEN[]
 4634|  19.7k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  19.7k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  19.7k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  19.7k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
 4635|  19.7k|  static const XML_Char atypeNMTOKENS[]
 4636|  19.7k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  19.7k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  19.7k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  19.7k|#define ASCII_K 0x4B
  ------------------
 4637|  19.7k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.7k|#define ASCII_S 0x53
  ------------------
 4638|  19.7k|  static const XML_Char notationPrefix[]
 4639|  19.7k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  19.7k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  19.7k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
 4640|  19.7k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  19.7k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.7k|#define ASCII_LPAREN 0x28
  ------------------
 4641|  19.7k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  19.7k|#define ASCII_PIPE 0x7C
  ------------------
 4642|  19.7k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.7k|#define ASCII_LPAREN 0x28
  ------------------
 4643|       |
 4644|       |#ifndef XML_DTD
 4645|       |  UNUSED_P(account);
 4646|       |#endif
 4647|       |
 4648|       |  /* save one level of indirection */
 4649|  19.7k|  DTD *const dtd = parser->m_dtd;
 4650|       |
 4651|  19.7k|  const char **eventPP;
 4652|  19.7k|  const char **eventEndPP;
 4653|  19.7k|  enum XML_Content_Quant quant;
 4654|       |
 4655|  19.7k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4655:7): [True: 19.7k, False: 0]
  ------------------
 4656|  19.7k|    eventPP = &parser->m_eventPtr;
 4657|  19.7k|    eventEndPP = &parser->m_eventEndPtr;
 4658|  19.7k|  } else {
 4659|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4660|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4661|      0|  }
 4662|       |
 4663|  3.54M|  for (;;) {
 4664|  3.54M|    int role;
 4665|  3.54M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  3.54M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4666|  3.54M|    *eventPP = s;
 4667|  3.54M|    *eventEndPP = next;
 4668|  3.54M|    if (tok <= 0) {
  ------------------
  |  Branch (4668:9): [True: 6.58k, False: 3.54M]
  ------------------
 4669|  6.58k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.58k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4669:11): [True: 6.58k, False: 0]
  |  Branch (4669:23): [True: 4.62k, False: 1.96k]
  ------------------
 4670|  4.62k|        *nextPtr = s;
 4671|  4.62k|        return XML_ERROR_NONE;
 4672|  4.62k|      }
 4673|  1.96k|      switch (tok) {
 4674|  1.96k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  1.96k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4674:7): [True: 1.96k, False: 0]
  ------------------
 4675|  1.96k|        *eventPP = next;
 4676|  1.96k|        return XML_ERROR_INVALID_TOKEN;
 4677|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4677:7): [True: 0, False: 1.96k]
  ------------------
 4678|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4679|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4679:7): [True: 0, False: 1.96k]
  ------------------
 4680|      0|        return XML_ERROR_PARTIAL_CHAR;
 4681|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4681:7): [True: 0, False: 1.96k]
  ------------------
 4682|      0|        tok = -tok;
 4683|      0|        break;
 4684|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4684:7): [True: 0, False: 1.96k]
  ------------------
 4685|      0|#ifdef XML_DTD
 4686|       |        /* for internal PE NOT referenced between declarations */
 4687|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4687:13): [True: 0, False: 0]
  ------------------
 4688|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4688:16): [True: 0, False: 0]
  ------------------
 4689|      0|          *nextPtr = s;
 4690|      0|          return XML_ERROR_NONE;
 4691|      0|        }
 4692|       |        /* WFC: PE Between Declarations - must check that PE contains
 4693|       |           complete markup, not only for external PEs, but also for
 4694|       |           internal PEs if the reference occurs between declarations.
 4695|       |        */
 4696|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4696:13): [True: 0, False: 0]
  |  Branch (4696:40): [True: 0, False: 0]
  ------------------
 4697|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4697:15): [True: 0, False: 0]
  ------------------
 4698|      0|              == XML_ROLE_ERROR)
 4699|      0|            return XML_ERROR_INCOMPLETE_PE;
 4700|      0|          *nextPtr = s;
 4701|      0|          return XML_ERROR_NONE;
 4702|      0|        }
 4703|      0|#endif /* XML_DTD */
 4704|      0|        return XML_ERROR_NO_ELEMENTS;
 4705|      0|      default:
  ------------------
  |  Branch (4705:7): [True: 0, False: 1.96k]
  ------------------
 4706|      0|        tok = -tok;
 4707|      0|        next = end;
 4708|      0|        break;
 4709|  1.96k|      }
 4710|  1.96k|    }
 4711|  3.54M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  3.54M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4712|  3.54M|#ifdef XML_DTD
 4713|  3.54M|    switch (role) {
 4714|  11.3k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4714:5): [True: 11.3k, False: 3.53M]
  ------------------
 4715|  11.7k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 303, False: 3.54M]
  ------------------
 4716|  11.7k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4716:5): [True: 0, False: 3.54M]
  ------------------
 4717|  11.7k|      break;
 4718|  3.53M|    default:
  ------------------
  |  Branch (4718:5): [True: 3.53M, False: 11.7k]
  ------------------
 4719|  3.53M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4719:11): [True: 0, False: 3.53M]
  ------------------
 4720|      0|        accountingOnAbort(parser);
 4721|      0|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4722|      0|      }
 4723|  3.54M|    }
 4724|  3.54M|#endif
 4725|  3.54M|    switch (role) {
  ------------------
  |  Branch (4725:13): [True: 0, False: 3.54M]
  ------------------
 4726|    303|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4726:5): [True: 303, False: 3.54M]
  ------------------
 4727|    303|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4728|    303|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4728:11): [True: 226, False: 77]
  ------------------
 4729|    226|        return result;
 4730|     77|      enc = parser->m_encoding;
 4731|     77|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     77|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4732|     77|    } break;
 4733|  5.92k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4733:5): [True: 5.92k, False: 3.53M]
  ------------------
 4734|  5.92k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4734:11): [True: 0, False: 5.92k]
  ------------------
 4735|      0|        parser->m_doctypeName
 4736|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4737|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4737:13): [True: 0, False: 0]
  ------------------
 4738|      0|          return XML_ERROR_NO_MEMORY;
 4739|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4740|      0|        parser->m_doctypePubid = NULL;
 4741|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4742|      0|      }
 4743|  5.92k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4744|  5.92k|      break;
 4745|  5.09k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4745:5): [True: 5.09k, False: 3.53M]
  ------------------
 4746|  5.09k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4746:11): [True: 0, False: 5.09k]
  ------------------
 4747|      0|        parser->m_startDoctypeDeclHandler(
 4748|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4749|      0|            parser->m_doctypePubid, 1);
 4750|      0|        parser->m_doctypeName = NULL;
 4751|      0|        poolClear(&parser->m_tempPool);
 4752|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4753|      0|      }
 4754|  5.09k|      break;
 4755|      0|#ifdef XML_DTD
 4756|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4756:5): [True: 0, False: 3.54M]
  ------------------
 4757|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4758|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4758:11): [True: 0, False: 0]
  ------------------
 4759|      0|        return result;
 4760|      0|      enc = parser->m_encoding;
 4761|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4762|      0|    } break;
 4763|      0|#endif /* XML_DTD */
 4764|    712|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4764:5): [True: 712, False: 3.54M]
  ------------------
 4765|    712|#ifdef XML_DTD
 4766|    712|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    712|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4767|    712|      parser->m_declEntity = (ENTITY *)lookup(
 4768|    712|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4769|    712|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4769:11): [True: 0, False: 712]
  ------------------
 4770|      0|        return XML_ERROR_NO_MEMORY;
 4771|    712|#endif /* XML_DTD */
 4772|    712|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    712|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4773|    712|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4773:11): [True: 0, False: 712]
  ------------------
 4774|      0|        XML_Char *pubId;
 4775|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4775:13): [True: 0, False: 0]
  ------------------
 4776|      0|          return XML_ERROR_PUBLICID;
 4777|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4778|      0|                                s + enc->minBytesPerChar,
 4779|      0|                                next - enc->minBytesPerChar);
 4780|      0|        if (! pubId)
  ------------------
  |  Branch (4780:13): [True: 0, False: 0]
  ------------------
 4781|      0|          return XML_ERROR_NO_MEMORY;
 4782|      0|        normalizePublicId(pubId);
 4783|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4784|      0|        parser->m_doctypePubid = pubId;
 4785|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4786|      0|        goto alreadyChecked;
 4787|      0|      }
 4788|       |      /* fall through */
 4789|  3.11k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4789:5): [True: 2.40k, False: 3.53M]
  ------------------
 4790|  3.11k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  3.11k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4790:11): [True: 84, False: 3.02k]
  ------------------
 4791|     84|        return XML_ERROR_PUBLICID;
 4792|  3.02k|    alreadyChecked:
 4793|  3.02k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4793:11): [True: 2.29k, False: 735]
  |  Branch (4793:34): [True: 883, False: 1.41k]
  ------------------
 4794|    883|        XML_Char *tem
 4795|    883|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4796|    883|                              next - enc->minBytesPerChar);
 4797|    883|        if (! tem)
  ------------------
  |  Branch (4797:13): [True: 0, False: 883]
  ------------------
 4798|      0|          return XML_ERROR_NO_MEMORY;
 4799|    883|        normalizePublicId(tem);
 4800|    883|        parser->m_declEntity->publicId = tem;
 4801|    883|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    883|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4802|       |        /* Don't suppress the default handler if we fell through from
 4803|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4804|       |         */
 4805|    883|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4805:13): [True: 0, False: 883]
  |  Branch (4805:44): [True: 0, False: 0]
  ------------------
 4806|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4807|    883|      }
 4808|  3.02k|      break;
 4809|  3.02k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4809:5): [True: 2.27k, False: 3.54M]
  ------------------
 4810|  2.27k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.27k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4810:11): [True: 0, False: 2.27k]
  ------------------
 4811|       |        /* Must not close doctype from within expanded parameter entities */
 4812|      0|        return XML_ERROR_INVALID_TOKEN;
 4813|      0|      }
 4814|       |
 4815|  2.27k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4815:11): [True: 0, False: 2.27k]
  ------------------
 4816|      0|        parser->m_startDoctypeDeclHandler(
 4817|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4818|      0|            parser->m_doctypePubid, 0);
 4819|      0|        poolClear(&parser->m_tempPool);
 4820|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4821|      0|      }
 4822|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4823|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4824|       |         was not set, indicating an external subset
 4825|       |      */
 4826|  2.27k|#ifdef XML_DTD
 4827|  2.27k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4827:11): [True: 2, False: 2.27k]
  |  Branch (4827:37): [True: 0, False: 2.27k]
  ------------------
 4828|      2|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4829|      2|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      2|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4830|      2|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4830:13): [True: 0, False: 2]
  ------------------
 4831|      2|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4831:16): [True: 0, False: 0]
  ------------------
 4832|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4833|      0|                                            externalSubsetName, sizeof(ENTITY));
 4834|      0|          if (! entity) {
  ------------------
  |  Branch (4834:15): [True: 0, False: 0]
  ------------------
 4835|       |            /* The external subset name "#" will have already been
 4836|       |             * inserted into the hash table at the start of the
 4837|       |             * external entity parsing, so no allocation will happen
 4838|       |             * and lookup() cannot fail.
 4839|       |             */
 4840|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4841|      0|          }
 4842|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4842:15): [True: 0, False: 0]
  ------------------
 4843|      0|            entity->base = parser->m_curBase;
 4844|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4845|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4845:15): [True: 0, False: 0]
  ------------------
 4846|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4847|      0|                  entity->systemId, entity->publicId))
 4848|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4849|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4849:15): [True: 0, False: 0]
  ------------------
 4850|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4850:17): [True: 0, False: 0]
  |  Branch (4850:38): [True: 0, False: 0]
  ------------------
 4851|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4851:20): [True: 0, False: 0]
  ------------------
 4852|      0|              return XML_ERROR_NOT_STANDALONE;
 4853|      0|          }
 4854|       |          /* if we didn't read the foreign DTD then this means that there
 4855|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4856|       |          */
 4857|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4857:20): [True: 0, False: 0]
  ------------------
 4858|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4859|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4860|      0|        }
 4861|      2|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|      2|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4862|      2|      }
 4863|  2.27k|#endif /* XML_DTD */
 4864|  2.27k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4864:11): [True: 0, False: 2.27k]
  ------------------
 4865|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4866|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4867|      0|      }
 4868|  2.27k|      break;
 4869|  11.3k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4869:5): [True: 11.3k, False: 3.53M]
  ------------------
 4870|  11.3k|#ifdef XML_DTD
 4871|       |      /* if there is no DOCTYPE declaration then now is the
 4872|       |         last chance to read the foreign DTD
 4873|       |      */
 4874|  11.3k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4874:11): [True: 0, False: 11.3k]
  ------------------
 4875|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4876|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4877|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4877:13): [True: 0, False: 0]
  ------------------
 4878|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4878:16): [True: 0, False: 0]
  ------------------
 4879|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4880|      0|                                            externalSubsetName, sizeof(ENTITY));
 4881|      0|          if (! entity)
  ------------------
  |  Branch (4881:15): [True: 0, False: 0]
  ------------------
 4882|      0|            return XML_ERROR_NO_MEMORY;
 4883|      0|          entity->base = parser->m_curBase;
 4884|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4885|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4885:15): [True: 0, False: 0]
  ------------------
 4886|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4887|      0|                  entity->systemId, entity->publicId))
 4888|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4889|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4889:15): [True: 0, False: 0]
  ------------------
 4890|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4890:17): [True: 0, False: 0]
  |  Branch (4890:38): [True: 0, False: 0]
  ------------------
 4891|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4891:20): [True: 0, False: 0]
  ------------------
 4892|      0|              return XML_ERROR_NOT_STANDALONE;
 4893|      0|          }
 4894|       |          /* if we didn't read the foreign DTD then this means that there
 4895|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4896|       |          */
 4897|      0|          else
 4898|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4899|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4900|      0|        }
 4901|      0|      }
 4902|  11.3k|#endif /* XML_DTD */
 4903|  11.3k|      parser->m_processor = contentProcessor;
 4904|  11.3k|      return contentProcessor(parser, s, end, nextPtr);
 4905|  8.57k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4905:5): [True: 8.57k, False: 3.53M]
  ------------------
 4906|  8.57k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4907|  8.57k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4907:11): [True: 0, False: 8.57k]
  ------------------
 4908|      0|        return XML_ERROR_NO_MEMORY;
 4909|  8.57k|      goto checkAttListDeclHandler;
 4910|  23.0k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4910:5): [True: 23.0k, False: 3.51M]
  ------------------
 4911|  23.0k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4912|  23.0k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4912:11): [True: 0, False: 23.0k]
  ------------------
 4913|      0|        return XML_ERROR_NO_MEMORY;
 4914|  23.0k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  23.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4915|  23.0k|      parser->m_declAttributeType = NULL;
 4916|  23.0k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  23.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4917|  23.0k|      goto checkAttListDeclHandler;
 4918|    749|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4918:5): [True: 749, False: 3.54M]
  ------------------
 4919|    749|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    749|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4920|    749|      parser->m_declAttributeType = atypeCDATA;
 4921|    749|      goto checkAttListDeclHandler;
 4922|  4.36k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4922:5): [True: 4.36k, False: 3.53M]
  ------------------
 4923|  4.36k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  4.36k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4924|  4.36k|      parser->m_declAttributeType = atypeID;
 4925|  4.36k|      goto checkAttListDeclHandler;
 4926|  6.31k|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4926:5): [True: 6.31k, False: 3.53M]
  ------------------
 4927|  6.31k|      parser->m_declAttributeType = atypeIDREF;
 4928|  6.31k|      goto checkAttListDeclHandler;
 4929|  1.47k|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4929:5): [True: 1.47k, False: 3.54M]
  ------------------
 4930|  1.47k|      parser->m_declAttributeType = atypeIDREFS;
 4931|  1.47k|      goto checkAttListDeclHandler;
 4932|  2.72k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4932:5): [True: 2.72k, False: 3.53M]
  ------------------
 4933|  2.72k|      parser->m_declAttributeType = atypeENTITY;
 4934|  2.72k|      goto checkAttListDeclHandler;
 4935|  1.70k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4935:5): [True: 1.70k, False: 3.54M]
  ------------------
 4936|  1.70k|      parser->m_declAttributeType = atypeENTITIES;
 4937|  1.70k|      goto checkAttListDeclHandler;
 4938|    219|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4938:5): [True: 219, False: 3.54M]
  ------------------
 4939|    219|      parser->m_declAttributeType = atypeNMTOKEN;
 4940|    219|      goto checkAttListDeclHandler;
 4941|    106|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4941:5): [True: 106, False: 3.54M]
  ------------------
 4942|    106|      parser->m_declAttributeType = atypeNMTOKENS;
 4943|  49.3k|    checkAttListDeclHandler:
 4944|  49.3k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4944:11): [True: 47.8k, False: 1.45k]
  |  Branch (4944:34): [True: 0, False: 47.8k]
  ------------------
 4945|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4946|  49.3k|      break;
 4947|  10.1k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4947:5): [True: 10.1k, False: 3.53M]
  ------------------
 4948|  12.2k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4948:5): [True: 2.11k, False: 3.54M]
  ------------------
 4949|  12.2k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4949:11): [True: 10.6k, False: 1.62k]
  |  Branch (4949:34): [True: 0, False: 10.6k]
  ------------------
 4950|      0|        const XML_Char *prefix;
 4951|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4951:13): [True: 0, False: 0]
  ------------------
 4952|      0|          prefix = enumValueSep;
 4953|      0|        } else {
 4954|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4954:21): [True: 0, False: 0]
  ------------------
 4955|      0|                                                              : enumValueStart);
 4956|      0|        }
 4957|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4957:13): [True: 0, False: 0]
  ------------------
 4958|      0|          return XML_ERROR_NO_MEMORY;
 4959|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4959:13): [True: 0, False: 0]
  ------------------
 4960|      0|          return XML_ERROR_NO_MEMORY;
 4961|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4962|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4963|      0|      }
 4964|  12.2k|      break;
 4965|  12.2k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 6.52k, False: 3.53M]
  ------------------
 4966|  8.50k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4966:5): [True: 1.97k, False: 3.54M]
  ------------------
 4967|  8.50k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4967:11): [True: 8.12k, False: 377]
  ------------------
 4968|  8.12k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4968:13): [True: 0, False: 8.12k]
  ------------------
 4969|  8.12k|                              parser->m_declAttributeId,
 4970|  8.12k|                              parser->m_declAttributeIsCdata,
 4971|  8.12k|                              parser->m_declAttributeIsId, 0, parser))
 4972|      0|          return XML_ERROR_NO_MEMORY;
 4973|  8.12k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4973:13): [True: 0, False: 8.12k]
  |  Branch (4973:45): [True: 0, False: 0]
  ------------------
 4974|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:15): [True: 0, False: 0]
  ------------------
 4975|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:19): [True: 0, False: 0]
  ------------------
 4976|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4976:22): [True: 0, False: 0]
  ------------------
 4977|       |            /* Enumerated or Notation type */
 4978|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:17): [True: 0, False: 0]
  ------------------
 4979|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4979:20): [True: 0, False: 0]
  ------------------
 4980|      0|              return XML_ERROR_NO_MEMORY;
 4981|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4982|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4983|      0|          }
 4984|      0|          *eventEndPP = s;
 4985|      0|          parser->m_attlistDeclHandler(
 4986|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4987|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4988|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4989|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4990|      0|        }
 4991|  8.12k|      }
 4992|  8.50k|      poolClear(&parser->m_tempPool);
 4993|  8.50k|      break;
 4994|  12.9k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 12.9k, False: 3.52M]
  ------------------
 4995|  14.0k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4995:5): [True: 1.15k, False: 3.54M]
  ------------------
 4996|  14.0k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4996:11): [True: 13.7k, False: 289]
  ------------------
 4997|  13.7k|        const XML_Char *attVal;
 4998|  13.7k|        enum XML_Error result = storeAttributeValue(
 4999|  13.7k|            parser, enc, parser->m_declAttributeIsCdata,
 5000|  13.7k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5001|  13.7k|            XML_ACCOUNT_NONE);
 5002|  13.7k|        if (result)
  ------------------
  |  Branch (5002:13): [True: 12, False: 13.7k]
  ------------------
 5003|     12|          return result;
 5004|  13.7k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  596|  13.7k|#define poolStart(pool) ((pool)->start)
  ------------------
 5005|  13.7k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  13.7k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5006|       |        /* ID attributes aren't allowed to have a default */
 5007|  13.7k|        if (! defineAttribute(
  ------------------
  |  Branch (5007:13): [True: 0, False: 13.7k]
  ------------------
 5008|  13.7k|                parser->m_declElementType, parser->m_declAttributeId,
 5009|  13.7k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  13.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5010|      0|          return XML_ERROR_NO_MEMORY;
 5011|  13.7k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5011:13): [True: 0, False: 13.7k]
  |  Branch (5011:45): [True: 0, False: 0]
  ------------------
 5012|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:15): [True: 0, False: 0]
  ------------------
 5013|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:19): [True: 0, False: 0]
  ------------------
 5014|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5014:22): [True: 0, False: 0]
  ------------------
 5015|       |            /* Enumerated or Notation type */
 5016|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:17): [True: 0, False: 0]
  ------------------
 5017|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5017:20): [True: 0, False: 0]
  ------------------
 5018|      0|              return XML_ERROR_NO_MEMORY;
 5019|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5020|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5021|      0|          }
 5022|      0|          *eventEndPP = s;
 5023|      0|          parser->m_attlistDeclHandler(
 5024|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5025|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5026|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5027|      0|          poolClear(&parser->m_tempPool);
 5028|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5029|      0|        }
 5030|  13.7k|      }
 5031|  14.0k|      break;
 5032|  14.0k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5032:5): [True: 8.40k, False: 3.53M]
  ------------------
 5033|  8.40k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5033:11): [True: 7.55k, False: 847]
  ------------------
 5034|  7.55k|        enum XML_Error result
 5035|  7.55k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5036|  7.55k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5037|  7.55k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5037:13): [True: 3.57k, False: 3.98k]
  ------------------
 5038|  3.57k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  596|  3.57k|#define poolStart(pool) ((pool)->start)
  ------------------
 5039|  3.57k|          parser->m_declEntity->textLen
 5040|  3.57k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  597|  3.57k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5041|  3.57k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  601|  3.57k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5042|  3.57k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5042:15): [True: 0, False: 3.57k]
  ------------------
 5043|      0|            *eventEndPP = s;
 5044|      0|            parser->m_entityDeclHandler(
 5045|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5046|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5047|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5048|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5049|      0|          }
 5050|  3.57k|        } else
 5051|  3.98k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  600|  3.98k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5052|  7.55k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5052:13): [True: 76, False: 7.48k]
  ------------------
 5053|     76|          return result;
 5054|  7.55k|      }
 5055|  8.33k|      break;
 5056|  8.33k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5056:5): [True: 40, False: 3.54M]
  ------------------
 5057|     40|#ifdef XML_DTD
 5058|     40|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     40|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5059|     40|#endif /* XML_DTD */
 5060|     40|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     40|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5061|     40|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5061:11): [True: 0, False: 40]
  ------------------
 5062|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5063|      0|                                                 s + enc->minBytesPerChar,
 5064|      0|                                                 next - enc->minBytesPerChar);
 5065|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5065:13): [True: 0, False: 0]
  ------------------
 5066|      0|          return XML_ERROR_NO_MEMORY;
 5067|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5068|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5069|      0|      }
 5070|     40|#ifdef XML_DTD
 5071|     40|      else
 5072|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5073|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5074|     40|        parser->m_doctypeSysid = externalSubsetName;
 5075|     40|#endif /* XML_DTD */
 5076|     40|      if (! dtd->standalone
  ------------------
  |  Branch (5076:11): [True: 39, False: 1]
  ------------------
 5077|     40|#ifdef XML_DTD
 5078|     40|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5078:14): [True: 39, False: 0]
  ------------------
 5079|     40|#endif /* XML_DTD */
 5080|     40|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5080:14): [True: 0, False: 39]
  ------------------
 5081|     40|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5081:14): [True: 0, False: 0]
  ------------------
 5082|      0|        return XML_ERROR_NOT_STANDALONE;
 5083|       |#ifndef XML_DTD
 5084|       |      break;
 5085|       |#else  /* XML_DTD */
 5086|     40|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5086:11): [True: 11, False: 29]
  ------------------
 5087|     11|        parser->m_declEntity = (ENTITY *)lookup(
 5088|     11|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5089|     11|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5089:13): [True: 0, False: 11]
  ------------------
 5090|      0|          return XML_ERROR_NO_MEMORY;
 5091|     11|        parser->m_declEntity->publicId = NULL;
 5092|     11|      }
 5093|     40|#endif /* XML_DTD */
 5094|       |      /* fall through */
 5095|  4.10k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5095:5): [True: 4.06k, False: 3.53M]
  ------------------
 5096|  4.10k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5096:11): [True: 3.29k, False: 809]
  |  Branch (5096:34): [True: 539, False: 2.75k]
  ------------------
 5097|    539|        parser->m_declEntity->systemId
 5098|    539|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5099|    539|                              next - enc->minBytesPerChar);
 5100|    539|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5100:13): [True: 0, False: 539]
  ------------------
 5101|      0|          return XML_ERROR_NO_MEMORY;
 5102|    539|        parser->m_declEntity->base = parser->m_curBase;
 5103|    539|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    539|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5104|       |        /* Don't suppress the default handler if we fell through from
 5105|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5106|       |         */
 5107|    539|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5107:13): [True: 0, False: 539]
  |  Branch (5107:44): [True: 0, False: 0]
  ------------------
 5108|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5109|    539|      }
 5110|  4.10k|      break;
 5111|  4.10k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5111:5): [True: 3.43k, False: 3.53M]
  ------------------
 5112|  3.43k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5112:11): [True: 2.70k, False: 738]
  |  Branch (5112:34): [True: 447, False: 2.25k]
  ------------------
 5113|  3.43k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5113:14): [True: 0, False: 447]
  ------------------
 5114|      0|        *eventEndPP = s;
 5115|      0|        parser->m_entityDeclHandler(
 5116|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5117|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5118|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5119|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5120|      0|      }
 5121|  3.43k|      break;
 5122|    592|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5122:5): [True: 592, False: 3.54M]
  ------------------
 5123|    592|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5123:11): [True: 524, False: 68]
  |  Branch (5123:34): [True: 37, False: 487]
  ------------------
 5124|     37|        parser->m_declEntity->notation
 5125|     37|            = poolStoreString(&dtd->pool, enc, s, next);
 5126|     37|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5126:13): [True: 0, False: 37]
  ------------------
 5127|      0|          return XML_ERROR_NO_MEMORY;
 5128|     37|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|     37|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5129|     37|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5129:13): [True: 0, False: 37]
  ------------------
 5130|      0|          *eventEndPP = s;
 5131|      0|          parser->m_unparsedEntityDeclHandler(
 5132|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5133|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5134|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5135|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5136|     37|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5136:20): [True: 0, False: 37]
  ------------------
 5137|      0|          *eventEndPP = s;
 5138|      0|          parser->m_entityDeclHandler(
 5139|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5140|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5141|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5142|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5143|      0|        }
 5144|     37|      }
 5145|    592|      break;
 5146|  7.51k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5146:5): [True: 7.51k, False: 3.53M]
  ------------------
 5147|  7.51k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  7.51k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 459, False: 7.05k]
  |  |  ------------------
  ------------------
 5148|    459|        parser->m_declEntity = NULL;
 5149|    459|        break;
 5150|    459|      }
 5151|  7.05k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5151:11): [True: 6.23k, False: 817]
  ------------------
 5152|  6.23k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5153|  6.23k|        if (! name)
  ------------------
  |  Branch (5153:13): [True: 0, False: 6.23k]
  ------------------
 5154|      0|          return XML_ERROR_NO_MEMORY;
 5155|  6.23k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5156|  6.23k|                                                name, sizeof(ENTITY));
 5157|  6.23k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5157:13): [True: 0, False: 6.23k]
  ------------------
 5158|      0|          return XML_ERROR_NO_MEMORY;
 5159|  6.23k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5159:13): [True: 2.60k, False: 3.63k]
  ------------------
 5160|  2.60k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.60k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5161|  2.60k|          parser->m_declEntity = NULL;
 5162|  3.63k|        } else {
 5163|  3.63k|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|  3.63k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5164|  3.63k|          parser->m_declEntity->publicId = NULL;
 5165|  3.63k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  3.63k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5166|       |          /* if we have a parent parser or are reading an internal parameter
 5167|       |             entity, then the entity declaration is not considered "internal"
 5168|       |          */
 5169|  3.63k|          parser->m_declEntity->is_internal
 5170|  3.63k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5170:20): [True: 0, False: 3.63k]
  |  Branch (5170:46): [True: 0, False: 3.63k]
  ------------------
 5171|  3.63k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5171:15): [True: 0, False: 3.63k]
  ------------------
 5172|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5173|  3.63k|        }
 5174|  6.23k|      } else {
 5175|    817|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    817|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5176|    817|        parser->m_declEntity = NULL;
 5177|    817|      }
 5178|  7.05k|    } break;
 5179|  7.05k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5179:5): [True: 5.11k, False: 3.53M]
  ------------------
 5180|  5.11k|#ifdef XML_DTD
 5181|  5.11k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5181:11): [True: 4.29k, False: 816]
  ------------------
 5182|  4.29k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5183|  4.29k|        if (! name)
  ------------------
  |  Branch (5183:13): [True: 0, False: 4.29k]
  ------------------
 5184|      0|          return XML_ERROR_NO_MEMORY;
 5185|  4.29k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5186|  4.29k|                                                name, sizeof(ENTITY));
 5187|  4.29k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5187:13): [True: 0, False: 4.29k]
  ------------------
 5188|      0|          return XML_ERROR_NO_MEMORY;
 5189|  4.29k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5189:13): [True: 3.77k, False: 523]
  ------------------
 5190|  3.77k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  3.77k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5191|  3.77k|          parser->m_declEntity = NULL;
 5192|  3.77k|        } else {
 5193|    523|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|    523|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5194|    523|          parser->m_declEntity->publicId = NULL;
 5195|    523|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    523|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5196|       |          /* if we have a parent parser or are reading an internal parameter
 5197|       |             entity, then the entity declaration is not considered "internal"
 5198|       |          */
 5199|    523|          parser->m_declEntity->is_internal
 5200|    523|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5200:20): [True: 0, False: 523]
  |  Branch (5200:46): [True: 0, False: 523]
  ------------------
 5201|    523|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5201:15): [True: 0, False: 523]
  ------------------
 5202|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5203|    523|        }
 5204|  4.29k|      } else {
 5205|    816|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    816|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5206|    816|        parser->m_declEntity = NULL;
 5207|    816|      }
 5208|       |#else  /* not XML_DTD */
 5209|       |      parser->m_declEntity = NULL;
 5210|       |#endif /* XML_DTD */
 5211|  5.11k|      break;
 5212|  5.11k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5212:5): [True: 1.70k, False: 3.54M]
  ------------------
 5213|  1.70k|      parser->m_declNotationPublicId = NULL;
 5214|  1.70k|      parser->m_declNotationName = NULL;
 5215|  1.70k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5215:11): [True: 0, False: 1.70k]
  ------------------
 5216|      0|        parser->m_declNotationName
 5217|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5218|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5218:13): [True: 0, False: 0]
  ------------------
 5219|      0|          return XML_ERROR_NO_MEMORY;
 5220|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5221|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5222|      0|      }
 5223|  1.70k|      break;
 5224|  1.70k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5224:5): [True: 1.40k, False: 3.54M]
  ------------------
 5225|  1.40k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  1.40k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5225:11): [True: 2, False: 1.39k]
  ------------------
 5226|      2|        return XML_ERROR_PUBLICID;
 5227|  1.39k|      if (parser
  ------------------
  |  Branch (5227:11): [True: 0, False: 1.39k]
  ------------------
 5228|  1.39k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5229|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5230|      0|                                        s + enc->minBytesPerChar,
 5231|      0|                                        next - enc->minBytesPerChar);
 5232|      0|        if (! tem)
  ------------------
  |  Branch (5232:13): [True: 0, False: 0]
  ------------------
 5233|      0|          return XML_ERROR_NO_MEMORY;
 5234|      0|        normalizePublicId(tem);
 5235|      0|        parser->m_declNotationPublicId = tem;
 5236|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5237|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5238|      0|      }
 5239|  1.39k|      break;
 5240|  1.39k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5240:5): [True: 529, False: 3.54M]
  ------------------
 5241|    529|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5241:11): [True: 0, False: 529]
  |  Branch (5241:41): [True: 0, False: 0]
  ------------------
 5242|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5243|      0|                                                   s + enc->minBytesPerChar,
 5244|      0|                                                   next - enc->minBytesPerChar);
 5245|      0|        if (! systemId)
  ------------------
  |  Branch (5245:13): [True: 0, False: 0]
  ------------------
 5246|      0|          return XML_ERROR_NO_MEMORY;
 5247|      0|        *eventEndPP = s;
 5248|      0|        parser->m_notationDeclHandler(
 5249|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5250|      0|            systemId, parser->m_declNotationPublicId);
 5251|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5252|      0|      }
 5253|    529|      poolClear(&parser->m_tempPool);
 5254|    529|      break;
 5255|  1.14k|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5255:5): [True: 1.14k, False: 3.54M]
  ------------------
 5256|  1.14k|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5256:11): [True: 0, False: 1.14k]
  |  Branch (5256:45): [True: 0, False: 0]
  ------------------
 5257|      0|        *eventEndPP = s;
 5258|      0|        parser->m_notationDeclHandler(
 5259|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5260|      0|            0, parser->m_declNotationPublicId);
 5261|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5262|      0|      }
 5263|  1.14k|      poolClear(&parser->m_tempPool);
 5264|  1.14k|      break;
 5265|  1.31k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5265:5): [True: 1.31k, False: 3.54M]
  ------------------
 5266|  1.31k|      switch (tok) {
 5267|      4|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      4|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5267:7): [True: 4, False: 1.31k]
  ------------------
 5268|       |        /* PE references in internal subset are
 5269|       |           not allowed within declarations. */
 5270|      4|        return XML_ERROR_PARAM_ENTITY_REF;
 5271|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5271:7): [True: 1, False: 1.31k]
  ------------------
 5272|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5273|  1.31k|      default:
  ------------------
  |  Branch (5273:7): [True: 1.31k, False: 5]
  ------------------
 5274|  1.31k|        return XML_ERROR_SYNTAX;
 5275|  1.31k|      }
 5276|      0|#ifdef XML_DTD
 5277|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5277:5): [True: 0, False: 3.54M]
  ------------------
 5278|      0|      enum XML_Error result;
 5279|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5279:11): [True: 0, False: 0]
  ------------------
 5280|      0|        reportDefault(parser, enc, s, next);
 5281|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5282|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5283|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5283:11): [True: 0, False: 0]
  ------------------
 5284|      0|        return result;
 5285|      0|      else if (! next) {
  ------------------
  |  Branch (5285:16): [True: 0, False: 0]
  ------------------
 5286|      0|        parser->m_processor = ignoreSectionProcessor;
 5287|      0|        return result;
 5288|      0|      }
 5289|      0|    } break;
 5290|      0|#endif /* XML_DTD */
 5291|  3.02M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5291:5): [True: 3.02M, False: 516k]
  ------------------
 5292|  3.02M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5292:11): [True: 1.18k, False: 3.02M]
  ------------------
 5293|  1.18k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5293:13): [True: 451, False: 733]
  ------------------
 5294|    451|          {
 5295|       |            /* Detect and prevent integer overflow */
 5296|    451|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5296:17): [True: 0, False: 451]
  ------------------
 5297|      0|              return XML_ERROR_NO_MEMORY;
 5298|      0|            }
 5299|       |
 5300|    451|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  715|    451|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5301|    451|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5302|    451|            if (new_connector == NULL) {
  ------------------
  |  Branch (5302:17): [True: 0, False: 451]
  ------------------
 5303|      0|              parser->m_groupSize /= 2;
 5304|      0|              return XML_ERROR_NO_MEMORY;
 5305|      0|            }
 5306|    451|            parser->m_groupConnector = new_connector;
 5307|    451|          }
 5308|       |
 5309|    451|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5309:15): [True: 0, False: 451]
  ------------------
 5310|       |            /* Detect and prevent integer overflow.
 5311|       |             * The preprocessor guard addresses the "always false" warning
 5312|       |             * from -Wtype-limits on platforms where
 5313|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5314|       |#if UINT_MAX >= SIZE_MAX
 5315|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5316|       |              return XML_ERROR_NO_MEMORY;
 5317|       |            }
 5318|       |#endif
 5319|       |
 5320|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5321|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5322|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5322:17): [True: 0, False: 0]
  ------------------
 5323|      0|              return XML_ERROR_NO_MEMORY;
 5324|      0|            dtd->scaffIndex = new_scaff_index;
 5325|      0|          }
 5326|    733|        } else {
 5327|    733|          parser->m_groupConnector
 5328|    733|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  714|    733|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5329|    733|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5329:15): [True: 0, False: 733]
  ------------------
 5330|      0|            parser->m_groupSize = 0;
 5331|      0|            return XML_ERROR_NO_MEMORY;
 5332|      0|          }
 5333|    733|        }
 5334|  1.18k|      }
 5335|  3.02M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5336|  3.02M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5336:11): [True: 0, False: 3.02M]
  ------------------
 5337|      0|        int myindex = nextScaffoldPart(parser);
 5338|      0|        if (myindex < 0)
  ------------------
  |  Branch (5338:13): [True: 0, False: 0]
  ------------------
 5339|      0|          return XML_ERROR_NO_MEMORY;
 5340|      0|        assert(dtd->scaffIndex != NULL);
 5341|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5342|      0|        dtd->scaffLevel++;
 5343|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5344|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5344:13): [True: 0, False: 0]
  ------------------
 5345|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5346|      0|      }
 5347|  3.02M|      break;
 5348|  3.02M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5348:5): [True: 7.02k, False: 3.53M]
  ------------------
 5349|  7.02k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  7.02k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5349:11): [True: 1, False: 7.02k]
  ------------------
 5350|      1|        return XML_ERROR_SYNTAX;
 5351|  7.02k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  7.02k|#define ASCII_COMMA 0x2C
  ------------------
 5352|  7.02k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5352:11): [True: 0, False: 7.02k]
  |  Branch (5352:29): [True: 0, False: 0]
  ------------------
 5353|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5354|  7.02k|      break;
 5355|  13.0k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5355:5): [True: 13.0k, False: 3.52M]
  ------------------
 5356|  13.0k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  13.0k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5356:11): [True: 2, False: 13.0k]
  ------------------
 5357|      2|        return XML_ERROR_SYNTAX;
 5358|  13.0k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5358:11): [True: 0, False: 13.0k]
  ------------------
 5359|  13.0k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|  13.0k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5360:14): [True: 0, False: 0]
  ------------------
 5361|      0|              != XML_CTYPE_MIXED)) {
 5362|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5363|      0|            = XML_CTYPE_CHOICE;
 5364|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5364:13): [True: 0, False: 0]
  ------------------
 5365|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5366|      0|      }
 5367|  13.0k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  13.0k|#define ASCII_PIPE 0x7C
  ------------------
 5368|  13.0k|      break;
 5369|  3.85k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5369:5): [True: 3.85k, False: 3.53M]
  ------------------
 5370|  3.85k|#ifdef XML_DTD
 5371|  3.85k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5371:5): [True: 0, False: 3.54M]
  ------------------
 5372|  3.85k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  3.85k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5373|  3.85k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5373:11): [True: 3.85k, False: 0]
  ------------------
 5374|  3.85k|        dtd->keepProcessing = dtd->standalone;
 5375|      0|      else {
 5376|      0|        const XML_Char *name;
 5377|      0|        ENTITY *entity;
 5378|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5379|      0|                               next - enc->minBytesPerChar);
 5380|      0|        if (! name)
  ------------------
  |  Branch (5380:13): [True: 0, False: 0]
  ------------------
 5381|      0|          return XML_ERROR_NO_MEMORY;
 5382|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5383|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5384|       |        /* first, determine if a check for an existing declaration is needed;
 5385|       |           if yes, check that the entity exists, and that it is internal,
 5386|       |           otherwise call the skipped entity handler
 5387|       |        */
 5388|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5388:13): [True: 0, False: 0]
  ------------------
 5389|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5389:16): [True: 0, False: 0]
  |  Branch (5389:17): [True: 0, False: 0]
  ------------------
 5390|      0|                                : ! dtd->hasParamEntityRefs)) {
 5391|      0|          if (! entity)
  ------------------
  |  Branch (5391:15): [True: 0, False: 0]
  ------------------
 5392|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5393|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5393:20): [True: 0, False: 0]
  ------------------
 5394|       |            /* It's hard to exhaustively search the code to be sure,
 5395|       |             * but there doesn't seem to be a way of executing the
 5396|       |             * following line.  There are two cases:
 5397|       |             *
 5398|       |             * If 'standalone' is false, the DTD must have no
 5399|       |             * parameter entities or we wouldn't have passed the outer
 5400|       |             * 'if' statement.  That means the only entity in the hash
 5401|       |             * table is the external subset name "#" which cannot be
 5402|       |             * given as a parameter entity name in XML syntax, so the
 5403|       |             * lookup must have returned NULL and we don't even reach
 5404|       |             * the test for an internal entity.
 5405|       |             *
 5406|       |             * If 'standalone' is true, it does not seem to be
 5407|       |             * possible to create entities taking this code path that
 5408|       |             * are not internal entities, so fail the test above.
 5409|       |             *
 5410|       |             * Because this analysis is very uncertain, the code is
 5411|       |             * being left in place and merely removed from the
 5412|       |             * coverage test statistics.
 5413|       |             */
 5414|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5415|      0|          }
 5416|      0|        } else if (! entity) {
  ------------------
  |  Branch (5416:20): [True: 0, False: 0]
  ------------------
 5417|      0|          dtd->keepProcessing = dtd->standalone;
 5418|       |          /* cannot report skipped entities in declarations */
 5419|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5419:15): [True: 0, False: 0]
  ------------------
 5420|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5420:18): [True: 0, False: 0]
  ------------------
 5421|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5422|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5423|      0|          }
 5424|      0|          break;
 5425|      0|        }
 5426|      0|        if (entity->open)
  ------------------
  |  Branch (5426:13): [True: 0, False: 0]
  ------------------
 5427|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5428|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5428:13): [True: 0, False: 0]
  ------------------
 5429|      0|          enum XML_Error result;
 5430|      0|          XML_Bool betweenDecl
 5431|      0|              = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
                            = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
  |  Branch (5431:18): [True: 0, False: 0]
  ------------------
 5432|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5433|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5433:15): [True: 0, False: 0]
  ------------------
 5434|      0|            return result;
 5435|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5436|      0|          break;
 5437|      0|        }
 5438|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5438:13): [True: 0, False: 0]
  ------------------
 5439|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5440|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5441|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5442|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5442:15): [True: 0, False: 0]
  ------------------
 5443|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5444|      0|                  entity->systemId, entity->publicId)) {
 5445|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5446|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5447|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5448|      0|          }
 5449|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5450|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5452|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5452:15): [True: 0, False: 0]
  ------------------
 5453|      0|            dtd->keepProcessing = dtd->standalone;
 5454|      0|            break;
 5455|      0|          }
 5456|      0|        } else {
 5457|      0|          dtd->keepProcessing = dtd->standalone;
 5458|      0|          break;
 5459|      0|        }
 5460|      0|      }
 5461|  3.85k|#endif /* XML_DTD */
 5462|  3.85k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5462:11): [True: 3.78k, False: 74]
  |  Branch (5462:32): [True: 0, False: 3.78k]
  ------------------
 5463|  3.85k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5463:14): [True: 0, False: 0]
  ------------------
 5464|      0|        return XML_ERROR_NOT_STANDALONE;
 5465|  3.85k|      break;
 5466|       |
 5467|       |      /* Element declaration stuff */
 5468|       |
 5469|  6.77k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5469:5): [True: 6.77k, False: 3.53M]
  ------------------
 5470|  6.77k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5470:11): [True: 0, False: 6.77k]
  ------------------
 5471|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5472|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5472:13): [True: 0, False: 0]
  ------------------
 5473|      0|          return XML_ERROR_NO_MEMORY;
 5474|      0|        dtd->scaffLevel = 0;
 5475|      0|        dtd->scaffCount = 0;
 5476|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5477|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5478|      0|      }
 5479|  6.77k|      break;
 5480|       |
 5481|  6.77k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5481:5): [True: 19, False: 3.54M]
  ------------------
 5482|    213|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5482:5): [True: 194, False: 3.54M]
  ------------------
 5483|    213|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5483:11): [True: 0, False: 213]
  ------------------
 5484|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5484:13): [True: 0, False: 0]
  ------------------
 5485|      0|          XML_Content *content
 5486|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5487|      0|          if (! content)
  ------------------
  |  Branch (5487:15): [True: 0, False: 0]
  ------------------
 5488|      0|            return XML_ERROR_NO_MEMORY;
 5489|      0|          content->quant = XML_CQUANT_NONE;
 5490|      0|          content->name = NULL;
 5491|      0|          content->numchildren = 0;
 5492|      0|          content->children = NULL;
 5493|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5493:28): [True: 0, False: 0]
  ------------------
 5494|      0|                                                          : XML_CTYPE_EMPTY);
 5495|      0|          *eventEndPP = s;
 5496|      0|          parser->m_elementDeclHandler(
 5497|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5498|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5499|      0|        }
 5500|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5501|      0|      }
 5502|    213|      break;
 5503|       |
 5504|  4.65k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5504:5): [True: 4.65k, False: 3.53M]
  ------------------
 5505|  4.65k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5505:11): [True: 0, False: 4.65k]
  ------------------
 5506|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5507|      0|            = XML_CTYPE_MIXED;
 5508|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5508:13): [True: 0, False: 0]
  ------------------
 5509|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5510|      0|      }
 5511|  4.65k|      break;
 5512|       |
 5513|  17.7k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5513:5): [True: 17.7k, False: 3.52M]
  ------------------
 5514|  17.7k|      quant = XML_CQUANT_NONE;
 5515|  17.7k|      goto elementContent;
 5516|  1.33k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5516:5): [True: 1.33k, False: 3.54M]
  ------------------
 5517|  1.33k|      quant = XML_CQUANT_OPT;
 5518|  1.33k|      goto elementContent;
 5519|    941|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5519:5): [True: 941, False: 3.54M]
  ------------------
 5520|    941|      quant = XML_CQUANT_REP;
 5521|    941|      goto elementContent;
 5522|  2.78k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5522:5): [True: 2.78k, False: 3.53M]
  ------------------
 5523|  2.78k|      quant = XML_CQUANT_PLUS;
 5524|  22.7k|    elementContent:
 5525|  22.7k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5525:11): [True: 0, False: 22.7k]
  ------------------
 5526|      0|        ELEMENT_TYPE *el;
 5527|      0|        const XML_Char *name;
 5528|      0|        size_t nameLen;
 5529|      0|        const char *nxt
 5530|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5530:16): [True: 0, False: 0]
  ------------------
 5531|      0|        int myindex = nextScaffoldPart(parser);
 5532|      0|        if (myindex < 0)
  ------------------
  |  Branch (5532:13): [True: 0, False: 0]
  ------------------
 5533|      0|          return XML_ERROR_NO_MEMORY;
 5534|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5535|      0|        dtd->scaffold[myindex].quant = quant;
 5536|      0|        el = getElementType(parser, enc, s, nxt);
 5537|      0|        if (! el)
  ------------------
  |  Branch (5537:13): [True: 0, False: 0]
  ------------------
 5538|      0|          return XML_ERROR_NO_MEMORY;
 5539|      0|        name = el->name;
 5540|      0|        dtd->scaffold[myindex].name = name;
 5541|      0|        nameLen = 0;
 5542|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5542:16): [True: 0, False: 0]
  ------------------
 5543|      0|          ;
 5544|       |
 5545|       |        /* Detect and prevent integer overflow */
 5546|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5546:13): [True: 0, False: 0]
  ------------------
 5547|      0|          return XML_ERROR_NO_MEMORY;
 5548|      0|        }
 5549|       |
 5550|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5551|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5551:13): [True: 0, False: 0]
  ------------------
 5552|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5553|      0|      }
 5554|  22.7k|      break;
 5555|       |
 5556|  22.7k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5556:5): [True: 17.8k, False: 3.52M]
  ------------------
 5557|  17.8k|      quant = XML_CQUANT_NONE;
 5558|  17.8k|      goto closeGroup;
 5559|  2.21k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5559:5): [True: 2.21k, False: 3.54M]
  ------------------
 5560|  2.21k|      quant = XML_CQUANT_OPT;
 5561|  2.21k|      goto closeGroup;
 5562|  7.47k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5562:5): [True: 7.47k, False: 3.53M]
  ------------------
 5563|  7.47k|      quant = XML_CQUANT_REP;
 5564|  7.47k|      goto closeGroup;
 5565|  1.89k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5565:5): [True: 1.89k, False: 3.54M]
  ------------------
 5566|  1.89k|      quant = XML_CQUANT_PLUS;
 5567|  29.4k|    closeGroup:
 5568|  29.4k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5568:11): [True: 0, False: 29.4k]
  ------------------
 5569|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5569:13): [True: 0, False: 0]
  ------------------
 5570|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5571|      0|        dtd->scaffLevel--;
 5572|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5573|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5573:13): [True: 0, False: 0]
  ------------------
 5574|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5574:15): [True: 0, False: 0]
  ------------------
 5575|      0|            XML_Content *model = build_model(parser);
 5576|      0|            if (! model)
  ------------------
  |  Branch (5576:17): [True: 0, False: 0]
  ------------------
 5577|      0|              return XML_ERROR_NO_MEMORY;
 5578|      0|            *eventEndPP = s;
 5579|      0|            parser->m_elementDeclHandler(
 5580|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5581|      0|          }
 5582|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5583|      0|          dtd->contentStringLen = 0;
 5584|      0|        }
 5585|      0|      }
 5586|  29.4k|      break;
 5587|       |      /* End element declaration stuff */
 5588|       |
 5589|  29.4k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5589:5): [True: 6.84k, False: 3.53M]
  ------------------
 5590|  6.84k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5590:11): [True: 0, False: 6.84k]
  ------------------
 5591|      0|        return XML_ERROR_NO_MEMORY;
 5592|  6.84k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  6.84k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5593|  6.84k|      break;
 5594|  1.24k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5594:5): [True: 1.24k, False: 3.54M]
  ------------------
 5595|  1.24k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5595:11): [True: 0, False: 1.24k]
  ------------------
 5596|      0|        return XML_ERROR_NO_MEMORY;
 5597|  1.24k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.24k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5598|  1.24k|      break;
 5599|  11.9k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5599:5): [True: 11.9k, False: 3.53M]
  ------------------
 5600|  11.9k|      switch (tok) {
  ------------------
  |  Branch (5600:15): [True: 4.81k, False: 7.17k]
  ------------------
 5601|  7.17k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  7.17k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5601:7): [True: 7.17k, False: 4.81k]
  ------------------
 5602|  7.17k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  7.17k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5603|  7.17k|        break;
 5604|  11.9k|      }
 5605|  11.9k|      break;
 5606|  17.1k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5606:5): [True: 17.1k, False: 3.52M]
  ------------------
 5607|  17.1k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5607:11): [True: 0, False: 17.1k]
  ------------------
 5608|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5609|  17.1k|      break;
 5610|  72.9k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5610:5): [True: 72.9k, False: 3.46M]
  ------------------
 5611|  72.9k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5611:11): [True: 62.0k, False: 10.8k]
  |  Branch (5611:34): [True: 0, False: 62.0k]
  ------------------
 5612|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5613|  72.9k|      break;
 5614|  10.2k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5614:5): [True: 10.2k, False: 3.53M]
  ------------------
 5615|  10.2k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5615:11): [True: 0, False: 10.2k]
  ------------------
 5616|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5617|  10.2k|      break;
 5618|   119k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5618:5): [True: 119k, False: 3.42M]
  ------------------
 5619|   119k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5619:11): [True: 115k, False: 4.14k]
  |  Branch (5619:34): [True: 0, False: 115k]
  ------------------
 5620|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5621|   119k|      break;
 5622|  40.6k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5622:5): [True: 40.6k, False: 3.50M]
  ------------------
 5623|  40.6k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5623:11): [True: 0, False: 40.6k]
  ------------------
 5624|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5625|  40.6k|      break;
 5626|  3.54M|    } /* end of big switch */
 5627|       |
 5628|  3.52M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5628:9): [True: 3.51M, False: 15.3k]
  |  Branch (5628:26): [True: 0, False: 3.51M]
  ------------------
 5629|      0|      reportDefault(parser, enc, s, next);
 5630|       |
 5631|  3.52M|    switch (parser->m_parsingStatus.parsing) {
 5632|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5632:5): [True: 0, False: 3.52M]
  ------------------
 5633|      0|      *nextPtr = next;
 5634|      0|      return XML_ERROR_NONE;
 5635|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5635:5): [True: 0, False: 3.52M]
  ------------------
 5636|      0|      return XML_ERROR_ABORTED;
 5637|  3.52M|    default:
  ------------------
  |  Branch (5637:5): [True: 3.52M, False: 0]
  ------------------
 5638|  3.52M|      s = next;
 5639|  3.52M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  3.52M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  3.52M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5640|  3.52M|    }
 5641|  3.52M|  }
 5642|       |  /* not reached */
 5643|  19.7k|}
xmlparse.c:accountingDiffTolerated:
 7737|  65.2M|                        enum XML_Account account) {
 7738|       |  /* Note: We need to check the token type *first* to be sure that
 7739|       |   *       we can even access variable <after>, safely.
 7740|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7741|  65.2M|  switch (tok) {
  ------------------
  |  Branch (7741:11): [True: 64.4M, False: 829k]
  ------------------
 7742|  2.52k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.52k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7742:3): [True: 2.52k, False: 65.2M]
  ------------------
 7743|  5.06k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  5.06k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7743:3): [True: 2.54k, False: 65.2M]
  ------------------
 7744|  5.50k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.50k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7744:3): [True: 444, False: 65.2M]
  ------------------
 7745|   829k|  case XML_TOK_NONE:
  ------------------
  |  |   51|   829k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7745:3): [True: 823k, False: 64.4M]
  ------------------
 7746|   829k|    return XML_TRUE;
  ------------------
  |  |   55|   829k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7747|  65.2M|  }
 7748|       |
 7749|  64.4M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7749:7): [True: 1.26M, False: 63.1M]
  ------------------
 7750|  1.26M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  1.26M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7751|       |
 7752|  63.1M|  unsigned int levelsAwayFromRootParser;
 7753|  63.1M|  const XML_Parser rootParser
 7754|  63.1M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7755|  63.1M|  assert(! rootParser->m_parentParser);
 7756|       |
 7757|      0|  const int isDirect
 7758|  63.1M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7758:9): [True: 5.72M, False: 57.4M]
  |  Branch (7758:44): [True: 5.72M, False: 0]
  ------------------
 7759|  63.1M|  const ptrdiff_t bytesMore = after - before;
 7760|       |
 7761|  63.1M|  XmlBigCount *const additionTarget
 7762|  63.1M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7762:9): [True: 5.72M, False: 57.4M]
  ------------------
 7763|  63.1M|                 : &rootParser->m_accounting.countBytesIndirect;
 7764|       |
 7765|       |  /* Detect and avoid integer overflow */
 7766|  63.1M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7766:7): [True: 0, False: 63.1M]
  ------------------
 7767|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7768|  63.1M|  *additionTarget += bytesMore;
 7769|       |
 7770|  63.1M|  const XmlBigCount countBytesOutput
 7771|  63.1M|      = rootParser->m_accounting.countBytesDirect
 7772|  63.1M|        + rootParser->m_accounting.countBytesIndirect;
 7773|  63.1M|  const float amplificationFactor
 7774|  63.1M|      = accountingGetCurrentAmplification(rootParser);
 7775|  63.1M|  const XML_Bool tolerated
 7776|  63.1M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7776:9): [True: 35.6M, False: 27.5M]
  ------------------
 7777|  63.1M|        || (amplificationFactor
  ------------------
  |  Branch (7777:12): [True: 27.4M, False: 48]
  ------------------
 7778|  27.5M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7779|       |
 7780|  63.1M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7780:7): [True: 0, False: 63.1M]
  ------------------
 7781|      0|    accountingReportStats(rootParser, "");
 7782|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7783|      0|                         bytesMore, source_line, account);
 7784|      0|  }
 7785|       |
 7786|  63.1M|  return tolerated;
 7787|  63.1M|}
xmlparse.c:getRootParserOf:
 7852|  64.7M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7853|  64.7M|  XML_Parser rootParser = parser;
 7854|  64.7M|  unsigned int stepsTakenUpwards = 0;
 7855|  64.7M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7855:10): [True: 0, False: 64.7M]
  ------------------
 7856|      0|    rootParser = rootParser->m_parentParser;
 7857|      0|    stepsTakenUpwards++;
 7858|      0|  }
 7859|  64.7M|  assert(! rootParser->m_parentParser);
 7860|  64.7M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7860:7): [True: 63.1M, False: 1.58M]
  ------------------
 7861|  63.1M|    *outLevelDiff = stepsTakenUpwards;
 7862|  63.1M|  }
 7863|  64.7M|  return rootParser;
 7864|  64.7M|}
xmlparse.c:accountingGetCurrentAmplification:
 7660|  63.1M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7661|  63.1M|  const XmlBigCount countBytesOutput
 7662|  63.1M|      = rootParser->m_accounting.countBytesDirect
 7663|  63.1M|        + rootParser->m_accounting.countBytesIndirect;
 7664|  63.1M|  const float amplificationFactor
 7665|  63.1M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7665:9): [True: 63.1M, False: 0]
  ------------------
 7666|  63.1M|            ? (countBytesOutput
 7667|  63.1M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7668|  63.1M|            : 1.0f;
 7669|  63.1M|  assert(! rootParser->m_parentParser);
 7670|      0|  return amplificationFactor;
 7671|  63.1M|}
xmlparse.c:accountingReportStats:
 7674|     47|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7675|     47|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7676|     47|  assert(! rootParser->m_parentParser);
 7677|       |
 7678|     47|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7678:7): [True: 47, False: 0]
  ------------------
 7679|     47|    return;
 7680|     47|  }
 7681|       |
 7682|      0|  const float amplificationFactor
 7683|      0|      = accountingGetCurrentAmplification(rootParser);
 7684|      0|  fprintf(stderr,
 7685|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7686|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7687|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7688|      0|          rootParser->m_accounting.countBytesIndirect,
 7689|      0|          (double)amplificationFactor, epilog);
 7690|      0|}
xmlparse.c:accountingOnAbort:
 7693|     47|accountingOnAbort(XML_Parser originParser) {
 7694|     47|  accountingReportStats(originParser, " ABORTING\n");
 7695|     47|}
xmlparse.c:processXmlDecl:
 4280|    303|               const char *next) {
 4281|    303|  const char *encodingName = NULL;
 4282|    303|  const XML_Char *storedEncName = NULL;
 4283|    303|  const ENCODING *newEncoding = NULL;
 4284|    303|  const char *version = NULL;
 4285|    303|  const char *versionend = NULL;
 4286|    303|  const XML_Char *storedversion = NULL;
 4287|    303|  int standalone = -1;
 4288|       |
 4289|    303|#ifdef XML_DTD
 4290|    303|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    303|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4290:7): [True: 0, False: 303]
  ------------------
 4291|    303|                                XML_ACCOUNT_DIRECT)) {
 4292|      0|    accountingOnAbort(parser);
 4293|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4294|      0|  }
 4295|    303|#endif
 4296|       |
 4297|    303|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4297:7): [True: 226, False: 77]
  |  Branch (4297:10): [True: 0, False: 303]
  ------------------
 4298|    303|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4299|    303|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4300|    226|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4300:9): [True: 0, False: 226]
  ------------------
 4301|      0|      return XML_ERROR_TEXT_DECL;
 4302|    226|    else
 4303|    226|      return XML_ERROR_XML_DECL;
 4304|    226|  }
 4305|     77|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4305:7): [True: 77, False: 0]
  |  Branch (4305:32): [True: 25, False: 52]
  ------------------
 4306|     25|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     25|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4307|     25|#ifdef XML_DTD
 4308|     25|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4308:9): [True: 0, False: 25]
  ------------------
 4309|     25|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4310|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4311|     25|#endif /* XML_DTD */
 4312|     25|  }
 4313|     77|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4313:7): [True: 0, False: 77]
  ------------------
 4314|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4314:9): [True: 0, False: 0]
  ------------------
 4315|      0|      storedEncName = poolStoreString(
 4316|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4317|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4318|      0|      if (! storedEncName)
  ------------------
  |  Branch (4318:11): [True: 0, False: 0]
  ------------------
 4319|      0|        return XML_ERROR_NO_MEMORY;
 4320|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4321|      0|    }
 4322|      0|    if (version) {
  ------------------
  |  Branch (4322:9): [True: 0, False: 0]
  ------------------
 4323|      0|      storedversion
 4324|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4325|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4326|      0|      if (! storedversion)
  ------------------
  |  Branch (4326:11): [True: 0, False: 0]
  ------------------
 4327|      0|        return XML_ERROR_NO_MEMORY;
 4328|      0|    }
 4329|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4330|      0|                             standalone);
 4331|     77|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4331:14): [True: 0, False: 77]
  ------------------
 4332|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4333|     77|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4333:7): [True: 0, False: 77]
  ------------------
 4334|      0|    if (newEncoding) {
  ------------------
  |  Branch (4334:9): [True: 0, False: 0]
  ------------------
 4335|       |      /* Check that the specified encoding does not conflict with what
 4336|       |       * the parser has already deduced.  Do we have the same number
 4337|       |       * of bytes in the smallest representation of a character?  If
 4338|       |       * this is UTF-16, is it the same endianness?
 4339|       |       */
 4340|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4340:11): [True: 0, False: 0]
  ------------------
 4341|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4341:15): [True: 0, False: 0]
  ------------------
 4342|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4342:18): [True: 0, False: 0]
  ------------------
 4343|      0|        parser->m_eventPtr = encodingName;
 4344|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4345|      0|      }
 4346|      0|      parser->m_encoding = newEncoding;
 4347|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4347:16): [True: 0, False: 0]
  ------------------
 4348|      0|      enum XML_Error result;
 4349|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4349:11): [True: 0, False: 0]
  ------------------
 4350|      0|        storedEncName = poolStoreString(
 4351|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4352|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4353|      0|        if (! storedEncName)
  ------------------
  |  Branch (4353:13): [True: 0, False: 0]
  ------------------
 4354|      0|          return XML_ERROR_NO_MEMORY;
 4355|      0|      }
 4356|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4357|      0|      poolClear(&parser->m_temp2Pool);
 4358|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4358:11): [True: 0, False: 0]
  ------------------
 4359|      0|        parser->m_eventPtr = encodingName;
 4360|      0|      return result;
 4361|      0|    }
 4362|      0|  }
 4363|       |
 4364|     77|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4364:7): [True: 0, False: 77]
  |  Branch (4364:24): [True: 0, False: 77]
  ------------------
 4365|      0|    poolClear(&parser->m_temp2Pool);
 4366|       |
 4367|     77|  return XML_ERROR_NONE;
 4368|     77|}
xmlparse.c:poolStoreString:
 7284|   917k|                const char *end) {
 7285|   917k|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7285:7): [True: 0, False: 917k]
  ------------------
 7286|      0|    return NULL;
 7287|   917k|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7287:7): [True: 256, False: 916k]
  |  Branch (7287:33): [True: 0, False: 256]
  ------------------
 7288|      0|    return NULL;
 7289|   917k|  *(pool->ptr)++ = 0;
 7290|   917k|  return pool->start;
 7291|   917k|}
xmlparse.c:lookup:
 7043|  3.57M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7044|  3.57M|  size_t i;
 7045|  3.57M|  if (table->size == 0) {
  ------------------
  |  Branch (7045:7): [True: 39.2k, False: 3.53M]
  ------------------
 7046|  39.2k|    size_t tsize;
 7047|  39.2k|    if (! createSize)
  ------------------
  |  Branch (7047:9): [True: 22.1k, False: 17.1k]
  ------------------
 7048|  22.1k|      return NULL;
 7049|  17.1k|    table->power = INIT_POWER;
  ------------------
  |  | 7007|  17.1k|#define INIT_POWER 6
  ------------------
 7050|       |    /* table->size is a power of 2 */
 7051|  17.1k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7007|  17.1k|#define INIT_POWER 6
  ------------------
 7052|  17.1k|    tsize = table->size * sizeof(NAMED *);
 7053|  17.1k|    table->v = table->mem->malloc_fcn(tsize);
 7054|  17.1k|    if (! table->v) {
  ------------------
  |  Branch (7054:9): [True: 0, False: 17.1k]
  ------------------
 7055|      0|      table->size = 0;
 7056|      0|      return NULL;
 7057|      0|    }
 7058|  17.1k|    memset(table->v, 0, tsize);
 7059|  17.1k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7060|  3.53M|  } else {
 7061|  3.53M|    unsigned long h = hash(parser, name);
 7062|  3.53M|    unsigned long mask = (unsigned long)table->size - 1;
 7063|  3.53M|    unsigned char step = 0;
 7064|  3.53M|    i = h & mask;
 7065|  3.58M|    while (table->v[i]) {
  ------------------
  |  Branch (7065:12): [True: 3.53M, False: 49.7k]
  ------------------
 7066|  3.53M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7066:11): [True: 3.48M, False: 56.5k]
  ------------------
 7067|  3.48M|        return table->v[i];
 7068|  56.5k|      if (! step)
  ------------------
  |  Branch (7068:11): [True: 51.6k, False: 4.90k]
  ------------------
 7069|  51.6k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  235|  51.6k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  51.6k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7070|  56.5k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7070:7): [True: 2.61k, False: 53.9k]
  ------------------
 7071|  56.5k|    }
 7072|  49.7k|    if (! createSize)
  ------------------
  |  Branch (7072:9): [True: 31.8k, False: 17.8k]
  ------------------
 7073|  31.8k|      return NULL;
 7074|       |
 7075|       |    /* check for overflow (table is half full) */
 7076|  17.8k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7076:9): [True: 207, False: 17.6k]
  ------------------
 7077|    207|      unsigned char newPower = table->power + 1;
 7078|       |
 7079|       |      /* Detect and prevent invalid shift */
 7080|    207|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7080:11): [True: 0, False: 207]
  ------------------
 7081|      0|        return NULL;
 7082|      0|      }
 7083|       |
 7084|    207|      size_t newSize = (size_t)1 << newPower;
 7085|    207|      unsigned long newMask = (unsigned long)newSize - 1;
 7086|       |
 7087|       |      /* Detect and prevent integer overflow */
 7088|    207|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7088:11): [True: 0, False: 207]
  ------------------
 7089|      0|        return NULL;
 7090|      0|      }
 7091|       |
 7092|    207|      size_t tsize = newSize * sizeof(NAMED *);
 7093|    207|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7094|    207|      if (! newV)
  ------------------
  |  Branch (7094:11): [True: 0, False: 207]
  ------------------
 7095|      0|        return NULL;
 7096|    207|      memset(newV, 0, tsize);
 7097|  23.3k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7097:19): [True: 23.1k, False: 207]
  ------------------
 7098|  23.1k|        if (table->v[i]) {
  ------------------
  |  Branch (7098:13): [True: 11.5k, False: 11.5k]
  ------------------
 7099|  11.5k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7100|  11.5k|          size_t j = newHash & newMask;
 7101|  11.5k|          step = 0;
 7102|  13.5k|          while (newV[j]) {
  ------------------
  |  Branch (7102:18): [True: 2.03k, False: 11.5k]
  ------------------
 7103|  2.03k|            if (! step)
  ------------------
  |  Branch (7103:17): [True: 1.61k, False: 420]
  ------------------
 7104|  1.61k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  235|  1.61k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  1.61k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7105|  2.03k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7105:13): [True: 292, False: 1.74k]
  ------------------
 7106|  2.03k|          }
 7107|  11.5k|          newV[j] = table->v[i];
 7108|  11.5k|        }
 7109|    207|      table->mem->free_fcn(table->v);
 7110|    207|      table->v = newV;
 7111|    207|      table->power = newPower;
 7112|    207|      table->size = newSize;
 7113|    207|      i = h & newMask;
 7114|    207|      step = 0;
 7115|    361|      while (table->v[i]) {
  ------------------
  |  Branch (7115:14): [True: 154, False: 207]
  ------------------
 7116|    154|        if (! step)
  ------------------
  |  Branch (7116:13): [True: 75, False: 79]
  ------------------
 7117|     75|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  235|     75|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|     75|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7118|    154|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7118:9): [True: 20, False: 134]
  ------------------
 7119|    154|      }
 7120|    207|    }
 7121|  17.8k|  }
 7122|  35.0k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7123|  35.0k|  if (! table->v[i])
  ------------------
  |  Branch (7123:7): [True: 0, False: 35.0k]
  ------------------
 7124|      0|    return NULL;
 7125|  35.0k|  memset(table->v[i], 0, createSize);
 7126|  35.0k|  table->v[i]->name = name;
 7127|  35.0k|  (table->used)++;
 7128|  35.0k|  return table->v[i];
 7129|  35.0k|}
xmlparse.c:hash:
 7032|  3.55M|hash(XML_Parser parser, KEY s) {
 7033|  3.55M|  struct siphash state;
 7034|  3.55M|  struct sipkey key;
 7035|  3.55M|  (void)sip24_valid;
 7036|  3.55M|  copy_salt_to_sipkey(parser, &key);
 7037|  3.55M|  sip24_init(&state, &key);
 7038|  3.55M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7039|  3.55M|  return (unsigned long)sip24_final(&state);
 7040|  3.55M|}
xmlparse.c:copy_salt_to_sipkey:
 7026|  3.55M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7027|  3.55M|  key->k[0] = 0;
 7028|  3.55M|  key->k[1] = get_hash_secret_salt(parser);
 7029|  3.55M|}
xmlparse.c:get_hash_secret_salt:
  947|  3.55M|get_hash_secret_salt(XML_Parser parser) {
  948|  3.55M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (948:7): [True: 0, False: 3.55M]
  ------------------
  949|      0|    return get_hash_secret_salt(parser->m_parentParser);
  950|  3.55M|  return parser->m_hash_secret_salt;
  951|  3.55M|}
xmlparse.c:keylen:
 7018|  3.55M|keylen(KEY s) {
 7019|  3.55M|  size_t len = 0;
 7020|  11.7M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7020:10): [True: 8.15M, False: 3.55M]
  ------------------
 7021|  8.15M|    ;
 7022|  3.55M|  return len;
 7023|  3.55M|}
xmlparse.c:keyeq:
 7010|  3.53M|keyeq(KEY s1, KEY s2) {
 7011|  7.22M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7011:10): [True: 7.16M, False: 56.5k]
  ------------------
 7012|  7.16M|    if (*s1 == 0)
  ------------------
  |  Branch (7012:9): [True: 3.48M, False: 3.68M]
  ------------------
 7013|  3.48M|      return XML_TRUE;
  ------------------
  |  |   55|  3.48M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7014|  56.5k|  return XML_FALSE;
  ------------------
  |  |   56|  56.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7015|  3.53M|}
xmlparse.c:normalizePublicId:
 6695|    883|normalizePublicId(XML_Char *publicId) {
 6696|    883|  XML_Char *p = publicId;
 6697|    883|  XML_Char *s;
 6698|  30.9k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6698:22): [True: 30.0k, False: 883]
  ------------------
 6699|  30.0k|    switch (*s) {
 6700|    779|    case 0x20:
  ------------------
  |  Branch (6700:5): [True: 779, False: 29.2k]
  ------------------
 6701|  1.64k|    case 0xD:
  ------------------
  |  Branch (6701:5): [True: 861, False: 29.2k]
  ------------------
 6702|  4.88k|    case 0xA:
  ------------------
  |  Branch (6702:5): [True: 3.24k, False: 26.8k]
  ------------------
 6703|  4.88k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6703:11): [True: 3.14k, False: 1.73k]
  |  Branch (6703:28): [True: 621, False: 2.52k]
  ------------------
 6704|    621|        *p++ = 0x20;
 6705|  4.88k|      break;
 6706|  25.1k|    default:
  ------------------
  |  Branch (6706:5): [True: 25.1k, False: 4.88k]
  ------------------
 6707|  25.1k|      *p++ = *s;
 6708|  30.0k|    }
 6709|  30.0k|  }
 6710|    883|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6710:7): [True: 580, False: 303]
  |  Branch (6710:24): [True: 78, False: 502]
  ------------------
 6711|     78|    --p;
 6712|    883|  *p = XML_T('\0');
  ------------------
  |  |  191|    883|#  define XML_T(x) x
  ------------------
 6713|    883|}
xmlparse.c:contentProcessor:
 2622|  11.3k|                 const char **endPtr) {
 2623|  11.3k|  enum XML_Error result = doContent(
 2624|  11.3k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2625|  11.3k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2626|  11.3k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2626:7): [True: 7.08k, False: 4.31k]
  ------------------
 2627|  7.08k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2627:9): [True: 0, False: 7.08k]
  ------------------
 2628|      0|      return XML_ERROR_NO_MEMORY;
 2629|  7.08k|  }
 2630|  11.3k|  return result;
 2631|  11.3k|}
xmlparse.c:doContent:
 2752|   170k|          XML_Bool haveMore, enum XML_Account account) {
 2753|       |  /* save one level of indirection */
 2754|   170k|  DTD *const dtd = parser->m_dtd;
 2755|       |
 2756|   170k|  const char **eventPP;
 2757|   170k|  const char **eventEndPP;
 2758|   170k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2758:7): [True: 11.3k, False: 159k]
  ------------------
 2759|  11.3k|    eventPP = &parser->m_eventPtr;
 2760|  11.3k|    eventEndPP = &parser->m_eventEndPtr;
 2761|   159k|  } else {
 2762|   159k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2763|   159k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2764|   159k|  }
 2765|   170k|  *eventPP = s;
 2766|       |
 2767|  5.02M|  for (;;) {
 2768|  5.02M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2769|  5.02M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  5.02M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  5.02M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2770|  5.02M|#ifdef XML_DTD
 2771|  5.02M|    const char *accountAfter
 2772|  5.02M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  5.02M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  5.02M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2772:12): [True: 765, False: 5.02M]
  |  Branch (2772:46): [True: 46, False: 5.02M]
  ------------------
 2773|  5.02M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2773:18): [True: 68, False: 743]
  ------------------
 2774|  5.02M|              : next;
 2775|  5.02M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2775:9): [True: 12, False: 5.02M]
  ------------------
 2776|  5.02M|                                  account)) {
 2777|     12|      accountingOnAbort(parser);
 2778|     12|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2779|     12|    }
 2780|  5.02M|#endif
 2781|  5.02M|    *eventEndPP = next;
 2782|  5.02M|    switch (tok) {
 2783|     46|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     46|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2783:5): [True: 46, False: 5.02M]
  ------------------
 2784|     46|      if (haveMore) {
  ------------------
  |  Branch (2784:11): [True: 46, False: 0]
  ------------------
 2785|     46|        *nextPtr = s;
 2786|     46|        return XML_ERROR_NONE;
 2787|     46|      }
 2788|      0|      *eventEndPP = end;
 2789|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2789:11): [True: 0, False: 0]
  ------------------
 2790|      0|        XML_Char c = 0xA;
 2791|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2792|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2792:18): [True: 0, False: 0]
  ------------------
 2793|      0|        reportDefault(parser, enc, s, end);
 2794|       |      /* We are at the end of the final buffer, should we check for
 2795|       |         XML_SUSPENDED, XML_FINISHED?
 2796|       |      */
 2797|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2797:11): [True: 0, False: 0]
  ------------------
 2798|      0|        return XML_ERROR_NO_ELEMENTS;
 2799|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2799:11): [True: 0, False: 0]
  ------------------
 2800|      0|        return XML_ERROR_ASYNC_ENTITY;
 2801|      0|      *nextPtr = end;
 2802|      0|      return XML_ERROR_NONE;
 2803|   161k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   161k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2803:5): [True: 161k, False: 4.86M]
  ------------------
 2804|   161k|      if (haveMore) {
  ------------------
  |  Branch (2804:11): [True: 3.79k, False: 157k]
  ------------------
 2805|  3.79k|        *nextPtr = s;
 2806|  3.79k|        return XML_ERROR_NONE;
 2807|  3.79k|      }
 2808|   157k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2808:11): [True: 157k, False: 0]
  ------------------
 2809|   157k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2809:13): [True: 22, False: 157k]
  ------------------
 2810|     22|          return XML_ERROR_ASYNC_ENTITY;
 2811|   157k|        *nextPtr = s;
 2812|   157k|        return XML_ERROR_NONE;
 2813|   157k|      }
 2814|      0|      return XML_ERROR_NO_ELEMENTS;
 2815|  2.31k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.31k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2815:5): [True: 2.31k, False: 5.02M]
  ------------------
 2816|  2.31k|      *eventPP = next;
 2817|  2.31k|      return XML_ERROR_INVALID_TOKEN;
 2818|  2.38k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.38k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2818:5): [True: 2.38k, False: 5.02M]
  ------------------
 2819|  2.38k|      if (haveMore) {
  ------------------
  |  Branch (2819:11): [True: 2.18k, False: 198]
  ------------------
 2820|  2.18k|        *nextPtr = s;
 2821|  2.18k|        return XML_ERROR_NONE;
 2822|  2.18k|      }
 2823|    198|      return XML_ERROR_UNCLOSED_TOKEN;
 2824|    310|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    310|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2824:5): [True: 310, False: 5.02M]
  ------------------
 2825|    310|      if (haveMore) {
  ------------------
  |  Branch (2825:11): [True: 310, False: 0]
  ------------------
 2826|    310|        *nextPtr = s;
 2827|    310|        return XML_ERROR_NONE;
 2828|    310|      }
 2829|      0|      return XML_ERROR_PARTIAL_CHAR;
 2830|   184k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   184k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2830:5): [True: 184k, False: 4.83M]
  ------------------
 2831|   184k|      const XML_Char *name;
 2832|   184k|      ENTITY *entity;
 2833|   184k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   184k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2834|   184k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2835|   184k|      if (ch) {
  ------------------
  |  Branch (2835:11): [True: 3.93k, False: 181k]
  ------------------
 2836|  3.93k|#ifdef XML_DTD
 2837|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2838|       |         *       so there is no amplification and hence recording without
 2839|       |         *       protection. */
 2840|  3.93k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2841|  3.93k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2842|  3.93k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2843|  3.93k|#endif /* XML_DTD */
 2844|  3.93k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2844:13): [True: 0, False: 3.93k]
  ------------------
 2845|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2846|  3.93k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2846:18): [True: 0, False: 3.93k]
  ------------------
 2847|      0|          reportDefault(parser, enc, s, next);
 2848|  3.93k|        break;
 2849|  3.93k|      }
 2850|   181k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2851|   181k|                             next - enc->minBytesPerChar);
 2852|   181k|      if (! name)
  ------------------
  |  Branch (2852:11): [True: 0, False: 181k]
  ------------------
 2853|      0|        return XML_ERROR_NO_MEMORY;
 2854|   181k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2855|   181k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  600|   181k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2856|       |      /* First, determine if a check for an existing declaration is needed;
 2857|       |         if yes, check that the entity exists, and that it is internal,
 2858|       |         otherwise call the skipped entity or default handler.
 2859|       |      */
 2860|   181k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2860:11): [True: 141k, False: 39.9k]
  |  Branch (2860:40): [True: 194, False: 39.7k]
  ------------------
 2861|   141k|        if (! entity)
  ------------------
  |  Branch (2861:13): [True: 332, False: 140k]
  ------------------
 2862|    332|          return XML_ERROR_UNDEFINED_ENTITY;
 2863|   140k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2863:18): [True: 0, False: 140k]
  ------------------
 2864|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2865|   141k|      } else if (! entity) {
  ------------------
  |  Branch (2865:18): [True: 21.1k, False: 18.5k]
  ------------------
 2866|  21.1k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2866:13): [True: 0, False: 21.1k]
  ------------------
 2867|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2868|  21.1k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2868:18): [True: 0, False: 21.1k]
  ------------------
 2869|      0|          reportDefault(parser, enc, s, next);
 2870|  21.1k|        break;
 2871|  21.1k|      }
 2872|   159k|      if (entity->open)
  ------------------
  |  Branch (2872:11): [True: 5, False: 159k]
  ------------------
 2873|      5|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2874|   159k|      if (entity->notation)
  ------------------
  |  Branch (2874:11): [True: 1, False: 159k]
  ------------------
 2875|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2876|   159k|      if (entity->textPtr) {
  ------------------
  |  Branch (2876:11): [True: 159k, False: 200]
  ------------------
 2877|   159k|        enum XML_Error result;
 2878|   159k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2878:13): [True: 0, False: 159k]
  ------------------
 2879|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2879:15): [True: 0, False: 0]
  ------------------
 2880|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2881|      0|                                           0);
 2882|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2882:20): [True: 0, False: 0]
  ------------------
 2883|      0|            reportDefault(parser, enc, s, next);
 2884|      0|          break;
 2885|      0|        }
 2886|   159k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   159k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2887|   159k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2887:13): [True: 764, False: 158k]
  ------------------
 2888|    764|          return result;
 2889|   159k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2889:18): [True: 0, False: 200]
  ------------------
 2890|      0|        const XML_Char *context;
 2891|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2892|      0|        context = getContext(parser);
 2893|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2894|      0|        if (! context)
  ------------------
  |  Branch (2894:13): [True: 0, False: 0]
  ------------------
 2895|      0|          return XML_ERROR_NO_MEMORY;
 2896|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2896:13): [True: 0, False: 0]
  ------------------
 2897|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2898|      0|                entity->systemId, entity->publicId))
 2899|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2900|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2901|    200|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2901:18): [True: 0, False: 200]
  ------------------
 2902|      0|        reportDefault(parser, enc, s, next);
 2903|   158k|      break;
 2904|   159k|    }
 2905|  2.63M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  2.63M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2905:5): [True: 2.63M, False: 2.38M]
  ------------------
 2906|       |      /* fall through */
 2907|  2.64M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  2.64M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2907:5): [True: 7.98k, False: 5.01M]
  ------------------
 2908|  2.64M|      TAG *tag;
 2909|  2.64M|      enum XML_Error result;
 2910|  2.64M|      XML_Char *toPtr;
 2911|  2.64M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2911:11): [True: 24.3k, False: 2.62M]
  ------------------
 2912|  24.3k|        tag = parser->m_freeTagList;
 2913|  24.3k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2914|  2.62M|      } else {
 2915|  2.62M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  714|  2.62M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2916|  2.62M|        if (! tag)
  ------------------
  |  Branch (2916:13): [True: 0, False: 2.62M]
  ------------------
 2917|      0|          return XML_ERROR_NO_MEMORY;
 2918|  2.62M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  714|  2.62M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2919|  2.62M|        if (! tag->buf) {
  ------------------
  |  Branch (2919:13): [True: 0, False: 2.62M]
  ------------------
 2920|      0|          FREE(parser, tag);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2921|      0|          return XML_ERROR_NO_MEMORY;
 2922|      0|        }
 2923|  2.62M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  242|  2.62M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2924|  2.62M|      }
 2925|  2.64M|      tag->bindings = NULL;
 2926|  2.64M|      tag->parent = parser->m_tagStack;
 2927|  2.64M|      parser->m_tagStack = tag;
 2928|  2.64M|      tag->name.localPart = NULL;
 2929|  2.64M|      tag->name.prefix = NULL;
 2930|  2.64M|      tag->rawName = s + enc->minBytesPerChar;
 2931|  2.64M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  2.64M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2932|  2.64M|      ++parser->m_tagLevel;
 2933|  2.64M|      {
 2934|  2.64M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2935|  2.64M|        const char *fromPtr = tag->rawName;
 2936|  2.64M|        toPtr = (XML_Char *)tag->buf;
 2937|  2.64M|        for (;;) {
 2938|  2.64M|          int bufSize;
 2939|  2.64M|          int convLen;
 2940|  2.64M|          const enum XML_Convert_Result convert_res
 2941|  2.64M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  161|  2.64M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  2.64M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2942|  2.64M|                           (ICHAR *)tag->bufEnd - 1);
 2943|  2.64M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2944|  2.64M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2944:15): [True: 2.64M, False: 1.86k]
  ------------------
 2945|  2.64M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2945:18): [True: 0, False: 1.86k]
  ------------------
 2946|  2.64M|            tag->name.strLen = convLen;
 2947|  2.64M|            break;
 2948|  2.64M|          }
 2949|  1.86k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2950|  1.86k|          {
 2951|  1.86k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|  1.86k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2952|  1.86k|            if (temp == NULL)
  ------------------
  |  Branch (2952:17): [True: 0, False: 1.86k]
  ------------------
 2953|      0|              return XML_ERROR_NO_MEMORY;
 2954|  1.86k|            tag->buf = temp;
 2955|  1.86k|            tag->bufEnd = temp + bufSize;
 2956|  1.86k|            toPtr = (XML_Char *)temp + convLen;
 2957|  1.86k|          }
 2958|  1.86k|        }
 2959|  2.64M|      }
 2960|  2.64M|      tag->name.str = (XML_Char *)tag->buf;
 2961|  2.64M|      *toPtr = XML_T('\0');
  ------------------
  |  |  191|  2.64M|#  define XML_T(x) x
  ------------------
 2962|  2.64M|      result
 2963|  2.64M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2964|  2.64M|      if (result)
  ------------------
  |  Branch (2964:11): [True: 668, False: 2.64M]
  ------------------
 2965|    668|        return result;
 2966|  2.64M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2966:11): [True: 2.64M, False: 0]
  ------------------
 2967|  2.64M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2968|  2.64M|                                      (const XML_Char **)parser->m_atts);
 2969|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2969:16): [True: 0, False: 0]
  ------------------
 2970|      0|        reportDefault(parser, enc, s, next);
 2971|  2.64M|      poolClear(&parser->m_tempPool);
 2972|  2.64M|      break;
 2973|  2.64M|    }
 2974|  6.51k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  6.51k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2974:5): [True: 6.51k, False: 5.01M]
  ------------------
 2975|       |      /* fall through */
 2976|  12.5k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  12.5k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2976:5): [True: 6.04k, False: 5.01M]
  ------------------
 2977|  12.5k|      const char *rawName = s + enc->minBytesPerChar;
 2978|  12.5k|      enum XML_Error result;
 2979|  12.5k|      BINDING *bindings = NULL;
 2980|  12.5k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  12.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2981|  12.5k|      TAG_NAME name;
 2982|  12.5k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2983|  12.5k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  12.5k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2984|  12.5k|      if (! name.str)
  ------------------
  |  Branch (2984:11): [True: 0, False: 12.5k]
  ------------------
 2985|      0|        return XML_ERROR_NO_MEMORY;
 2986|  12.5k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  12.5k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2987|  12.5k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2988|  12.5k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2989|  12.5k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2989:11): [True: 41, False: 12.5k]
  ------------------
 2990|     41|        freeBindings(parser, bindings);
 2991|     41|        return result;
 2992|     41|      }
 2993|  12.5k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  12.5k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2994|  12.5k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2994:11): [True: 12.5k, False: 0]
  ------------------
 2995|  12.5k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2996|  12.5k|                                      (const XML_Char **)parser->m_atts);
 2997|  12.5k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  12.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2998|  12.5k|      }
 2999|  12.5k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2999:11): [True: 12.5k, False: 0]
  ------------------
 3000|  12.5k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (3000:13): [True: 12.5k, False: 0]
  ------------------
 3001|  12.5k|          *eventPP = *eventEndPP;
 3002|  12.5k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3003|  12.5k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  12.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3004|  12.5k|      }
 3005|  12.5k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3005:11): [True: 0, False: 12.5k]
  |  Branch (3005:28): [True: 0, False: 0]
  ------------------
 3006|      0|        reportDefault(parser, enc, s, next);
 3007|  12.5k|      poolClear(&parser->m_tempPool);
 3008|  12.5k|      freeBindings(parser, bindings);
 3009|  12.5k|    }
 3010|  12.5k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3010:11): [True: 116, False: 12.4k]
  ------------------
 3011|  12.5k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3011:14): [True: 116, False: 0]
  ------------------
 3012|    116|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3012:13): [True: 0, False: 116]
  ------------------
 3013|      0|          parser->m_processor = epilogProcessor;
 3014|    116|        else
 3015|    116|          return epilogProcessor(parser, next, end, nextPtr);
 3016|    116|      }
 3017|  12.4k|      break;
 3018|  24.9k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  24.9k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3018:5): [True: 24.9k, False: 4.99M]
  ------------------
 3019|  24.9k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3019:11): [True: 7, False: 24.9k]
  ------------------
 3020|      7|        return XML_ERROR_ASYNC_ENTITY;
 3021|  24.9k|      else {
 3022|  24.9k|        int len;
 3023|  24.9k|        const char *rawName;
 3024|  24.9k|        TAG *tag = parser->m_tagStack;
 3025|  24.9k|        rawName = s + enc->minBytesPerChar * 2;
 3026|  24.9k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  24.9k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3027|  24.9k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3027:13): [True: 20, False: 24.8k]
  ------------------
 3028|  24.9k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3028:16): [True: 166, False: 24.7k]
  ------------------
 3029|    186|          *eventPP = rawName;
 3030|    186|          return XML_ERROR_TAG_MISMATCH;
 3031|    186|        }
 3032|  24.7k|        parser->m_tagStack = tag->parent;
 3033|  24.7k|        tag->parent = parser->m_freeTagList;
 3034|  24.7k|        parser->m_freeTagList = tag;
 3035|  24.7k|        --parser->m_tagLevel;
 3036|  24.7k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3036:13): [True: 24.7k, False: 0]
  ------------------
 3037|  24.7k|          const XML_Char *localPart;
 3038|  24.7k|          const XML_Char *prefix;
 3039|  24.7k|          XML_Char *uri;
 3040|  24.7k|          localPart = tag->name.localPart;
 3041|  24.7k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3041:15): [True: 0, False: 24.7k]
  |  Branch (3041:31): [True: 0, False: 0]
  ------------------
 3042|       |            /* localPart and prefix may have been overwritten in
 3043|       |               tag->name.str, since this points to the binding->uri
 3044|       |               buffer which gets re-used; so we have to add them again
 3045|       |            */
 3046|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3047|       |            /* don't need to check for space - already done in storeAtts() */
 3048|      0|            while (*localPart)
  ------------------
  |  Branch (3048:20): [True: 0, False: 0]
  ------------------
 3049|      0|              *uri++ = *localPart++;
 3050|      0|            prefix = tag->name.prefix;
 3051|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3051:17): [True: 0, False: 0]
  |  Branch (3051:42): [True: 0, False: 0]
  ------------------
 3052|      0|              *uri++ = parser->m_namespaceSeparator;
 3053|      0|              while (*prefix)
  ------------------
  |  Branch (3053:22): [True: 0, False: 0]
  ------------------
 3054|      0|                *uri++ = *prefix++;
 3055|      0|            }
 3056|      0|            *uri = XML_T('\0');
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
 3057|      0|          }
 3058|  24.7k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3059|  24.7k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3059:20): [True: 0, False: 0]
  ------------------
 3060|      0|          reportDefault(parser, enc, s, next);
 3061|  24.7k|        while (tag->bindings) {
  ------------------
  |  Branch (3061:16): [True: 0, False: 24.7k]
  ------------------
 3062|      0|          BINDING *b = tag->bindings;
 3063|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3063:15): [True: 0, False: 0]
  ------------------
 3064|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3065|      0|                                              b->prefix->name);
 3066|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3067|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3068|      0|          parser->m_freeBindingList = b;
 3069|      0|          b->prefix->binding = b->prevPrefixBinding;
 3070|      0|        }
 3071|  24.7k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3071:13): [True: 29, False: 24.6k]
  ------------------
 3072|  24.7k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3072:16): [True: 29, False: 0]
  ------------------
 3073|     29|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3073:15): [True: 0, False: 29]
  ------------------
 3074|      0|            parser->m_processor = epilogProcessor;
 3075|     29|          else
 3076|     29|            return epilogProcessor(parser, next, end, nextPtr);
 3077|     29|        }
 3078|  24.7k|      }
 3079|  24.6k|      break;
 3080|  24.6k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  7.26k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3080:5): [True: 7.26k, False: 5.01M]
  ------------------
 3081|  7.26k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  7.26k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3082|  7.26k|      if (n < 0)
  ------------------
  |  Branch (3082:11): [True: 199, False: 7.06k]
  ------------------
 3083|    199|        return XML_ERROR_BAD_CHAR_REF;
 3084|  7.06k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3084:11): [True: 0, False: 7.06k]
  ------------------
 3085|      0|        XML_Char buf[XML_ENCODE_MAX];
 3086|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3087|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  164|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3088|  7.06k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3088:18): [True: 0, False: 7.06k]
  ------------------
 3089|      0|        reportDefault(parser, enc, s, next);
 3090|  7.06k|    } break;
 3091|      3|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      3|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3091:5): [True: 3, False: 5.02M]
  ------------------
 3092|      3|      return XML_ERROR_MISPLACED_XML_PI;
 3093|  1.18M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  1.18M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3093:5): [True: 1.18M, False: 3.83M]
  ------------------
 3094|  1.18M|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3094:11): [True: 0, False: 1.18M]
  ------------------
 3095|      0|        XML_Char c = 0xA;
 3096|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3097|  1.18M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3097:18): [True: 0, False: 1.18M]
  ------------------
 3098|      0|        reportDefault(parser, enc, s, next);
 3099|  1.18M|      break;
 3100|  3.29k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  3.29k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3100:5): [True: 3.29k, False: 5.02M]
  ------------------
 3101|  3.29k|      enum XML_Error result;
 3102|  3.29k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3102:11): [True: 0, False: 3.29k]
  ------------------
 3103|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3104|       |      /* BEGIN disabled code */
 3105|       |      /* Suppose you doing a transformation on a document that involves
 3106|       |         changing only the character data.  You set up a defaultHandler
 3107|       |         and a characterDataHandler.  The defaultHandler simply copies
 3108|       |         characters through.  The characterDataHandler does the
 3109|       |         transformation and writes the characters out escaping them as
 3110|       |         necessary.  This case will fail to work if we leave out the
 3111|       |         following two lines (because & and < inside CDATA sections will
 3112|       |         be incorrectly escaped).
 3113|       |
 3114|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3115|       |         easier to let the user deal with this.
 3116|       |      */
 3117|  3.29k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3117:16): [Folded - Ignored]
  |  Branch (3117:23): [True: 0, False: 0]
  ------------------
 3118|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3119|      0|                                       0);
 3120|       |      /* END disabled code */
 3121|  3.29k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3121:16): [True: 0, False: 3.29k]
  ------------------
 3122|      0|        reportDefault(parser, enc, s, next);
 3123|  3.29k|      result
 3124|  3.29k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3125|  3.29k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3125:11): [True: 222, False: 3.07k]
  ------------------
 3126|    222|        return result;
 3127|  3.07k|      else if (! next) {
  ------------------
  |  Branch (3127:16): [True: 648, False: 2.42k]
  ------------------
 3128|    648|        parser->m_processor = cdataSectionProcessor;
 3129|    648|        return result;
 3130|    648|      }
 3131|  3.29k|    } break;
 3132|  2.42k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|    765|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3132:5): [True: 765, False: 5.02M]
  ------------------
 3133|    765|      if (haveMore) {
  ------------------
  |  Branch (3133:11): [True: 22, False: 743]
  ------------------
 3134|     22|        *nextPtr = s;
 3135|     22|        return XML_ERROR_NONE;
 3136|     22|      }
 3137|    743|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3137:11): [True: 0, False: 743]
  ------------------
 3138|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3139|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3140|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3141|      0|          parser->m_characterDataHandler(
 3142|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3143|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3144|      0|        } else
 3145|      0|          parser->m_characterDataHandler(
 3146|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3147|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3148|    743|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3148:18): [True: 0, False: 743]
  ------------------
 3149|      0|        reportDefault(parser, enc, s, end);
 3150|       |      /* We are at the end of the final buffer, should we check for
 3151|       |         XML_SUSPENDED, XML_FINISHED?
 3152|       |      */
 3153|    743|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3153:11): [True: 0, False: 743]
  ------------------
 3154|      0|        *eventPP = end;
 3155|      0|        return XML_ERROR_NO_ELEMENTS;
 3156|      0|      }
 3157|    743|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3157:11): [True: 37, False: 706]
  ------------------
 3158|     37|        *eventPP = end;
 3159|     37|        return XML_ERROR_ASYNC_ENTITY;
 3160|     37|      }
 3161|    706|      *nextPtr = end;
 3162|    706|      return XML_ERROR_NONE;
 3163|   779k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   779k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3163:5): [True: 779k, False: 4.24M]
  ------------------
 3164|   779k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3165|   779k|      if (charDataHandler) {
  ------------------
  |  Branch (3165:11): [True: 0, False: 779k]
  ------------------
 3166|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3167|      0|          for (;;) {
 3168|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3169|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3170|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3171|      0|            *eventEndPP = s;
 3172|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3173|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3174|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3174:17): [True: 0, False: 0]
  ------------------
 3175|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3175:20): [True: 0, False: 0]
  ------------------
 3176|      0|              break;
 3177|      0|            *eventPP = s;
 3178|      0|          }
 3179|      0|        } else
 3180|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3181|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3182|   779k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3182:18): [True: 0, False: 779k]
  ------------------
 3183|      0|        reportDefault(parser, enc, s, next);
 3184|   779k|    } break;
 3185|  9.82k|    case XML_TOK_PI:
  ------------------
  |  |   76|  9.82k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3185:5): [True: 9.82k, False: 5.01M]
  ------------------
 3186|  9.82k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3186:11): [True: 0, False: 9.82k]
  ------------------
 3187|      0|        return XML_ERROR_NO_MEMORY;
 3188|  9.82k|      break;
 3189|  9.82k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|  1.30k|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3189:5): [True: 1.30k, False: 5.02M]
  ------------------
 3190|  1.30k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3190:11): [True: 0, False: 1.30k]
  ------------------
 3191|      0|        return XML_ERROR_NO_MEMORY;
 3192|  1.30k|      break;
 3193|  1.30k|    default:
  ------------------
  |  Branch (3193:5): [True: 0, False: 5.02M]
  ------------------
 3194|       |      /* All of the tokens produced by XmlContentTok() have their own
 3195|       |       * explicit cases, so this default is not strictly necessary.
 3196|       |       * However it is a useful safety net, so we retain the code and
 3197|       |       * simply exclude it from the coverage tests.
 3198|       |       *
 3199|       |       * LCOV_EXCL_START
 3200|       |       */
 3201|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3201:11): [True: 0, False: 0]
  ------------------
 3202|      0|        reportDefault(parser, enc, s, next);
 3203|      0|      break;
 3204|       |      /* LCOV_EXCL_STOP */
 3205|  5.02M|    }
 3206|  4.85M|    *eventPP = s = next;
 3207|  4.85M|    switch (parser->m_parsingStatus.parsing) {
 3208|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3208:5): [True: 0, False: 4.85M]
  ------------------
 3209|      0|      *nextPtr = next;
 3210|      0|      return XML_ERROR_NONE;
 3211|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3211:5): [True: 0, False: 4.85M]
  ------------------
 3212|      0|      return XML_ERROR_ABORTED;
 3213|  4.85M|    default:;
  ------------------
  |  Branch (3213:5): [True: 4.85M, False: 0]
  ------------------
 3214|  4.85M|    }
 3215|  4.85M|  }
 3216|       |  /* not reached */
 3217|   170k|}
xmlparse.c:hashTableIterInit:
 7159|  19.7k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7160|  19.7k|  iter->p = table->v;
 7161|  19.7k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7161:15): [True: 10.4k, False: 9.27k]
  ------------------
 7162|  19.7k|}
xmlparse.c:hashTableIterNext:
 7165|  40.6k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7166|   705k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7166:10): [True: 685k, False: 19.7k]
  ------------------
 7167|   685k|    NAMED *tem = *(iter->p)++;
 7168|   685k|    if (tem)
  ------------------
  |  Branch (7168:9): [True: 20.9k, False: 664k]
  ------------------
 7169|  20.9k|      return tem;
 7170|   685k|  }
 7171|  19.7k|  return NULL;
 7172|  40.6k|}
xmlparse.c:storeAtts:
 3254|  2.65M|          enum XML_Account account) {
 3255|  2.65M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3256|  2.65M|  ELEMENT_TYPE *elementType;
 3257|  2.65M|  int nDefaultAtts;
 3258|  2.65M|  const XML_Char **appAtts; /* the attribute list for the application */
 3259|  2.65M|  int attIndex = 0;
 3260|  2.65M|  int prefixLen;
 3261|  2.65M|  int i;
 3262|  2.65M|  int n;
 3263|  2.65M|  XML_Char *uri;
 3264|  2.65M|  int nPrefixes = 0;
 3265|  2.65M|  BINDING *binding;
 3266|  2.65M|  const XML_Char *localPart;
 3267|       |
 3268|       |  /* lookup the element type name */
 3269|  2.65M|  elementType
 3270|  2.65M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3271|  2.65M|  if (! elementType) {
  ------------------
  |  Branch (3271:7): [True: 15.1k, False: 2.64M]
  ------------------
 3272|  15.1k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3273|  15.1k|    if (! name)
  ------------------
  |  Branch (3273:9): [True: 0, False: 15.1k]
  ------------------
 3274|      0|      return XML_ERROR_NO_MEMORY;
 3275|  15.1k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3276|  15.1k|                                         sizeof(ELEMENT_TYPE));
 3277|  15.1k|    if (! elementType)
  ------------------
  |  Branch (3277:9): [True: 0, False: 15.1k]
  ------------------
 3278|      0|      return XML_ERROR_NO_MEMORY;
 3279|  15.1k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3279:9): [True: 0, False: 15.1k]
  |  Branch (3279:25): [True: 0, False: 0]
  ------------------
 3280|      0|      return XML_ERROR_NO_MEMORY;
 3281|  15.1k|  }
 3282|  2.65M|  nDefaultAtts = elementType->nDefaultAtts;
 3283|       |
 3284|       |  /* get the attributes from the tokenizer */
 3285|  2.65M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  2.65M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3286|       |
 3287|       |  /* Detect and prevent integer overflow */
 3288|  2.65M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3288:7): [True: 0, False: 2.65M]
  ------------------
 3289|      0|    return XML_ERROR_NO_MEMORY;
 3290|      0|  }
 3291|       |
 3292|  2.65M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3292:7): [True: 429, False: 2.65M]
  ------------------
 3293|    429|    int oldAttsSize = parser->m_attsSize;
 3294|    429|    ATTRIBUTE *temp;
 3295|       |#ifdef XML_ATTR_INFO
 3296|       |    XML_AttrInfo *temp2;
 3297|       |#endif
 3298|       |
 3299|       |    /* Detect and prevent integer overflow */
 3300|    429|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  244|    429|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:9): [True: 0, False: 429]
  ------------------
 3301|    429|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  244|    429|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3301:12): [True: 0, False: 429]
  ------------------
 3302|      0|      return XML_ERROR_NO_MEMORY;
 3303|      0|    }
 3304|       |
 3305|    429|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  244|    429|#define INIT_ATTS_SIZE 16
  ------------------
 3306|       |
 3307|       |    /* Detect and prevent integer overflow.
 3308|       |     * The preprocessor guard addresses the "always false" warning
 3309|       |     * from -Wtype-limits on platforms where
 3310|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3311|       |#if UINT_MAX >= SIZE_MAX
 3312|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3313|       |      parser->m_attsSize = oldAttsSize;
 3314|       |      return XML_ERROR_NO_MEMORY;
 3315|       |    }
 3316|       |#endif
 3317|       |
 3318|    429|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  715|    429|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3319|    429|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3320|    429|    if (temp == NULL) {
  ------------------
  |  Branch (3320:9): [True: 0, False: 429]
  ------------------
 3321|      0|      parser->m_attsSize = oldAttsSize;
 3322|      0|      return XML_ERROR_NO_MEMORY;
 3323|      0|    }
 3324|    429|    parser->m_atts = temp;
 3325|       |#ifdef XML_ATTR_INFO
 3326|       |    /* Detect and prevent integer overflow.
 3327|       |     * The preprocessor guard addresses the "always false" warning
 3328|       |     * from -Wtype-limits on platforms where
 3329|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3330|       |#  if UINT_MAX >= SIZE_MAX
 3331|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3332|       |      parser->m_attsSize = oldAttsSize;
 3333|       |      return XML_ERROR_NO_MEMORY;
 3334|       |    }
 3335|       |#  endif
 3336|       |
 3337|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3338|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3339|       |    if (temp2 == NULL) {
 3340|       |      parser->m_attsSize = oldAttsSize;
 3341|       |      return XML_ERROR_NO_MEMORY;
 3342|       |    }
 3343|       |    parser->m_attInfo = temp2;
 3344|       |#endif
 3345|    429|    if (n > oldAttsSize)
  ------------------
  |  Branch (3345:9): [True: 419, False: 10]
  ------------------
 3346|    419|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    419|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3347|    429|  }
 3348|       |
 3349|  2.65M|  appAtts = (const XML_Char **)parser->m_atts;
 3350|  2.67M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3350:15): [True: 20.3k, False: 2.65M]
  ------------------
 3351|  20.3k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3352|       |#ifdef XML_ATTR_INFO
 3353|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3354|       |#endif
 3355|       |    /* add the name and value to the attribute list */
 3356|  20.3k|    ATTRIBUTE_ID *attId
 3357|  20.3k|        = getAttributeId(parser, enc, currAtt->name,
 3358|  20.3k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  20.3k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3359|  20.3k|    if (! attId)
  ------------------
  |  Branch (3359:9): [True: 0, False: 20.3k]
  ------------------
 3360|      0|      return XML_ERROR_NO_MEMORY;
 3361|       |#ifdef XML_ATTR_INFO
 3362|       |    currAttInfo->nameStart
 3363|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3364|       |    currAttInfo->nameEnd
 3365|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3366|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3367|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3368|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3369|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3370|       |#endif
 3371|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3372|       |       namespace processing is turned on and different prefixes for the same
 3373|       |       namespace are used. For this case we have a check further down.
 3374|       |    */
 3375|  20.3k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3375:9): [True: 506, False: 19.8k]
  ------------------
 3376|    506|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3376:11): [True: 505, False: 1]
  ------------------
 3377|    505|        parser->m_eventPtr = parser->m_atts[i].name;
 3378|    506|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3379|    506|    }
 3380|  19.8k|    (attId->name)[-1] = 1;
 3381|  19.8k|    appAtts[attIndex++] = attId->name;
 3382|  19.8k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3382:9): [True: 9.13k, False: 10.7k]
  ------------------
 3383|  9.13k|      enum XML_Error result;
 3384|  9.13k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  9.13k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3385|       |
 3386|       |      /* figure out whether declared as other than CDATA */
 3387|  9.13k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3387:11): [True: 1.36k, False: 7.77k]
  ------------------
 3388|  1.36k|        int j;
 3389|  1.92k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3389:21): [True: 1.65k, False: 275]
  ------------------
 3390|  1.65k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3390:15): [True: 1.08k, False: 566]
  ------------------
 3391|  1.08k|            isCdata = elementType->defaultAtts[j].isCdata;
 3392|  1.08k|            break;
 3393|  1.08k|          }
 3394|  1.65k|        }
 3395|  1.36k|      }
 3396|       |
 3397|       |      /* normalize the attribute value */
 3398|  9.13k|      result = storeAttributeValue(
 3399|  9.13k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3400|  9.13k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3401|  9.13k|      if (result)
  ------------------
  |  Branch (3401:11): [True: 203, False: 8.93k]
  ------------------
 3402|    203|        return result;
 3403|  8.93k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|  8.93k|#define poolStart(pool) ((pool)->start)
  ------------------
 3404|  8.93k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  8.93k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3405|  10.7k|    } else {
 3406|       |      /* the value did not need normalizing */
 3407|  10.7k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3408|  10.7k|                                          parser->m_atts[i].valuePtr,
 3409|  10.7k|                                          parser->m_atts[i].valueEnd);
 3410|  10.7k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3410:11): [True: 0, False: 10.7k]
  ------------------
 3411|      0|        return XML_ERROR_NO_MEMORY;
 3412|  10.7k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  10.7k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3413|  10.7k|    }
 3414|       |    /* handle prefixed attribute names */
 3415|  19.6k|    if (attId->prefix) {
  ------------------
  |  Branch (3415:9): [True: 0, False: 19.6k]
  ------------------
 3416|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3416:11): [True: 0, False: 0]
  ------------------
 3417|       |        /* deal with namespace declarations here */
 3418|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3419|      0|                                           appAtts[attIndex], bindingsPtr);
 3420|      0|        if (result)
  ------------------
  |  Branch (3420:13): [True: 0, False: 0]
  ------------------
 3421|      0|          return result;
 3422|      0|        --attIndex;
 3423|      0|      } else {
 3424|       |        /* deal with other prefixed names later */
 3425|      0|        attIndex++;
 3426|      0|        nPrefixes++;
 3427|      0|        (attId->name)[-1] = 2;
 3428|      0|      }
 3429|      0|    } else
 3430|  19.6k|      attIndex++;
 3431|  19.6k|  }
 3432|       |
 3433|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3434|  2.65M|  parser->m_nSpecifiedAtts = attIndex;
 3435|  2.65M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3435:7): [True: 543, False: 2.65M]
  |  Branch (3435:29): [True: 345, False: 198]
  ------------------
 3436|    559|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3436:17): [True: 559, False: 0]
  ------------------
 3437|    559|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3437:11): [True: 345, False: 214]
  ------------------
 3438|    345|        parser->m_idAttIndex = i;
 3439|    345|        break;
 3440|    345|      }
 3441|    345|  } else
 3442|  2.65M|    parser->m_idAttIndex = -1;
 3443|       |
 3444|       |  /* do attribute defaulting */
 3445|  2.66M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3445:15): [True: 3.91k, False: 2.65M]
  ------------------
 3446|  3.91k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3447|  3.91k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3447:9): [True: 2.72k, False: 1.18k]
  |  Branch (3447:33): [True: 725, False: 2.00k]
  ------------------
 3448|    725|      if (da->id->prefix) {
  ------------------
  |  Branch (3448:11): [True: 0, False: 725]
  ------------------
 3449|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3449:13): [True: 0, False: 0]
  ------------------
 3450|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3451|      0|                                             da->value, bindingsPtr);
 3452|      0|          if (result)
  ------------------
  |  Branch (3452:15): [True: 0, False: 0]
  ------------------
 3453|      0|            return result;
 3454|      0|        } else {
 3455|      0|          (da->id->name)[-1] = 2;
 3456|      0|          nPrefixes++;
 3457|      0|          appAtts[attIndex++] = da->id->name;
 3458|      0|          appAtts[attIndex++] = da->value;
 3459|      0|        }
 3460|    725|      } else {
 3461|    725|        (da->id->name)[-1] = 1;
 3462|    725|        appAtts[attIndex++] = da->id->name;
 3463|    725|        appAtts[attIndex++] = da->value;
 3464|    725|      }
 3465|    725|    }
 3466|  3.91k|  }
 3467|  2.65M|  appAtts[attIndex] = 0;
 3468|       |
 3469|       |  /* expand prefixed attribute names, check for duplicates,
 3470|       |     and clear flags that say whether attributes were specified */
 3471|  2.65M|  i = 0;
 3472|  2.65M|  if (nPrefixes) {
  ------------------
  |  Branch (3472:7): [True: 0, False: 2.65M]
  ------------------
 3473|      0|    int j; /* hash table index */
 3474|      0|    unsigned long version = parser->m_nsAttsVersion;
 3475|       |
 3476|       |    /* Detect and prevent invalid shift */
 3477|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3477:9): [True: 0, False: 0]
  ------------------
 3478|      0|      return XML_ERROR_NO_MEMORY;
 3479|      0|    }
 3480|       |
 3481|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3482|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3483|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3484|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3484:9): [True: 0, False: 0]
  ------------------
 3485|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3486|      0|      NS_ATT *temp;
 3487|       |      /* hash table size must also be a power of 2 and >= 8 */
 3488|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3488:14): [True: 0, False: 0]
  ------------------
 3489|      0|        ;
 3490|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3490:11): [True: 0, False: 0]
  ------------------
 3491|      0|        parser->m_nsAttsPower = 3;
 3492|       |
 3493|       |      /* Detect and prevent invalid shift */
 3494|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3494:11): [True: 0, False: 0]
  ------------------
 3495|       |        /* Restore actual size of memory in m_nsAtts */
 3496|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3497|      0|        return XML_ERROR_NO_MEMORY;
 3498|      0|      }
 3499|       |
 3500|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3501|       |
 3502|       |      /* Detect and prevent integer overflow.
 3503|       |       * The preprocessor guard addresses the "always false" warning
 3504|       |       * from -Wtype-limits on platforms where
 3505|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3506|       |#if UINT_MAX >= SIZE_MAX
 3507|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3508|       |        /* Restore actual size of memory in m_nsAtts */
 3509|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3510|       |        return XML_ERROR_NO_MEMORY;
 3511|       |      }
 3512|       |#endif
 3513|       |
 3514|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3515|      0|                               nsAttsSize * sizeof(NS_ATT));
 3516|      0|      if (! temp) {
  ------------------
  |  Branch (3516:11): [True: 0, False: 0]
  ------------------
 3517|       |        /* Restore actual size of memory in m_nsAtts */
 3518|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3519|      0|        return XML_ERROR_NO_MEMORY;
 3520|      0|      }
 3521|      0|      parser->m_nsAtts = temp;
 3522|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3523|      0|    }
 3524|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3525|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3525:9): [True: 0, False: 0]
  ------------------
 3526|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  245|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3527|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3527:28): [True: 0, False: 0]
  ------------------
 3528|      0|        parser->m_nsAtts[--j].version = version;
 3529|      0|    }
 3530|      0|    parser->m_nsAttsVersion = --version;
 3531|       |
 3532|       |    /* expand prefixed names and check for duplicates */
 3533|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3533:12): [True: 0, False: 0]
  ------------------
 3534|      0|      const XML_Char *s = appAtts[i];
 3535|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3535:11): [True: 0, False: 0]
  ------------------
 3536|      0|        ATTRIBUTE_ID *id;
 3537|      0|        const BINDING *b;
 3538|      0|        unsigned long uriHash;
 3539|      0|        struct siphash sip_state;
 3540|      0|        struct sipkey sip_key;
 3541|       |
 3542|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3543|      0|        sip24_init(&sip_state, &sip_key);
 3544|       |
 3545|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3546|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3547|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3547:13): [True: 0, False: 0]
  |  Branch (3547:21): [True: 0, False: 0]
  ------------------
 3548|       |          /* This code is walking through the appAtts array, dealing
 3549|       |           * with (in this case) a prefixed attribute name.  To be in
 3550|       |           * the array, the attribute must have already been bound, so
 3551|       |           * has to have passed through the hash table lookup once
 3552|       |           * already.  That implies that an entry for it already
 3553|       |           * exists, so the lookup above will return a pointer to
 3554|       |           * already allocated memory.  There is no opportunaity for
 3555|       |           * the allocator to fail, so the condition above cannot be
 3556|       |           * fulfilled.
 3557|       |           *
 3558|       |           * Since it is difficult to be certain that the above
 3559|       |           * analysis is complete, we retain the test and merely
 3560|       |           * remove the code from coverage tests.
 3561|       |           */
 3562|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3563|      0|        }
 3564|      0|        b = id->prefix->binding;
 3565|      0|        if (! b)
  ------------------
  |  Branch (3565:13): [True: 0, False: 0]
  ------------------
 3566|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3567|       |
 3568|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3568:21): [True: 0, False: 0]
  ------------------
 3569|      0|          const XML_Char c = b->uri[j];
 3570|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3570:15): [True: 0, False: 0]
  ------------------
 3571|      0|            return XML_ERROR_NO_MEMORY;
 3572|      0|        }
 3573|       |
 3574|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3575|       |
 3576|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3576:16): [True: 0, False: 0]
  ------------------
 3577|      0|          ;
 3578|       |
 3579|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3580|       |
 3581|      0|        do { /* copies null terminator */
 3582|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3582:15): [True: 0, False: 0]
  ------------------
 3583|      0|            return XML_ERROR_NO_MEMORY;
 3584|      0|        } while (*s++);
  ------------------
  |  Branch (3584:18): [True: 0, False: 0]
  ------------------
 3585|       |
 3586|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3587|       |
 3588|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3589|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3590|       |          */
 3591|      0|          unsigned char step = 0;
 3592|      0|          unsigned long mask = nsAttsSize - 1;
 3593|      0|          j = uriHash & mask; /* index into hash table */
 3594|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3594:18): [True: 0, False: 0]
  ------------------
 3595|       |            /* for speed we compare stored hash values first */
 3596|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3596:17): [True: 0, False: 0]
  ------------------
 3597|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3598|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3599|       |              /* s1 is null terminated, but not s2 */
 3600|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3600:22): [True: 0, False: 0]
  |  Branch (3600:36): [True: 0, False: 0]
  ------------------
 3601|      0|                ;
 3602|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3602:19): [True: 0, False: 0]
  ------------------
 3603|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3604|      0|            }
 3605|      0|            if (! step)
  ------------------
  |  Branch (3605:17): [True: 0, False: 0]
  ------------------
 3606|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  235|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3607|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3607:13): [True: 0, False: 0]
  ------------------
 3608|      0|          }
 3609|      0|        }
 3610|       |
 3611|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3611:13): [True: 0, False: 0]
  ------------------
 3612|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3613|      0|          s = b->prefix->name;
 3614|      0|          do {
 3615|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3615:17): [True: 0, False: 0]
  ------------------
 3616|      0|              return XML_ERROR_NO_MEMORY;
 3617|      0|          } while (*s++);
  ------------------
  |  Branch (3617:20): [True: 0, False: 0]
  ------------------
 3618|      0|        }
 3619|       |
 3620|       |        /* store expanded name in attribute list */
 3621|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3622|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3623|      0|        appAtts[i] = s;
 3624|       |
 3625|       |        /* fill empty slot with new version, uriName and hash value */
 3626|      0|        parser->m_nsAtts[j].version = version;
 3627|      0|        parser->m_nsAtts[j].hash = uriHash;
 3628|      0|        parser->m_nsAtts[j].uriName = s;
 3629|       |
 3630|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3630:13): [True: 0, False: 0]
  ------------------
 3631|      0|          i += 2;
 3632|      0|          break;
 3633|      0|        }
 3634|      0|      } else                     /* not prefixed */
 3635|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3636|      0|    }
 3637|      0|  }
 3638|       |  /* clear flags for the remaining attributes */
 3639|  2.67M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3639:10): [True: 19.3k, False: 2.65M]
  ------------------
 3640|  19.3k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3641|  2.65M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3641:32): [True: 0, False: 2.65M]
  ------------------
 3642|      0|    binding->attId->name[-1] = 0;
 3643|       |
 3644|  2.65M|  if (! parser->m_ns)
  ------------------
  |  Branch (3644:7): [True: 2.65M, False: 0]
  ------------------
 3645|  2.65M|    return XML_ERROR_NONE;
 3646|       |
 3647|       |  /* expand the element type name */
 3648|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3648:7): [True: 0, False: 0]
  ------------------
 3649|      0|    binding = elementType->prefix->binding;
 3650|      0|    if (! binding)
  ------------------
  |  Branch (3650:9): [True: 0, False: 0]
  ------------------
 3651|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3652|      0|    localPart = tagNamePtr->str;
 3653|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3653:12): [True: 0, False: 0]
  ------------------
 3654|      0|      ;
 3655|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3655:14): [True: 0, False: 0]
  ------------------
 3656|      0|    binding = dtd->defaultPrefix.binding;
 3657|      0|    localPart = tagNamePtr->str;
 3658|      0|  } else
 3659|      0|    return XML_ERROR_NONE;
 3660|      0|  prefixLen = 0;
 3661|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3661:7): [True: 0, False: 0]
  |  Branch (3661:32): [True: 0, False: 0]
  ------------------
 3662|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3662:12): [True: 0, False: 0]
  ------------------
 3663|      0|      ; /* prefixLen includes null terminator */
 3664|      0|  }
 3665|      0|  tagNamePtr->localPart = localPart;
 3666|      0|  tagNamePtr->uriLen = binding->uriLen;
 3667|      0|  tagNamePtr->prefix = binding->prefix->name;
 3668|      0|  tagNamePtr->prefixLen = prefixLen;
 3669|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3669:15): [True: 0, False: 0]
  ------------------
 3670|      0|    ; /* i includes null terminator */
 3671|       |
 3672|       |  /* Detect and prevent integer overflow */
 3673|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3673:7): [True: 0, False: 0]
  ------------------
 3674|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3674:10): [True: 0, False: 0]
  ------------------
 3675|      0|    return XML_ERROR_NO_MEMORY;
 3676|      0|  }
 3677|       |
 3678|      0|  n = i + binding->uriLen + prefixLen;
 3679|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3679:7): [True: 0, False: 0]
  ------------------
 3680|      0|    TAG *p;
 3681|       |
 3682|       |    /* Detect and prevent integer overflow */
 3683|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3683:9): [True: 0, False: 0]
  ------------------
 3684|      0|      return XML_ERROR_NO_MEMORY;
 3685|      0|    }
 3686|       |    /* Detect and prevent integer overflow.
 3687|       |     * The preprocessor guard addresses the "always false" warning
 3688|       |     * from -Wtype-limits on platforms where
 3689|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3690|       |#if UINT_MAX >= SIZE_MAX
 3691|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3692|       |      return XML_ERROR_NO_MEMORY;
 3693|       |    }
 3694|       |#endif
 3695|       |
 3696|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3697|      0|    if (! uri)
  ------------------
  |  Branch (3697:9): [True: 0, False: 0]
  ------------------
 3698|      0|      return XML_ERROR_NO_MEMORY;
 3699|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
 3700|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3701|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3701:34): [True: 0, False: 0]
  ------------------
 3702|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3702:11): [True: 0, False: 0]
  ------------------
 3703|      0|        p->name.str = uri;
 3704|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3705|      0|    binding->uri = uri;
 3706|      0|  }
 3707|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3708|      0|  uri = binding->uri + binding->uriLen;
 3709|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3710|       |  /* we always have a namespace separator between localPart and prefix */
 3711|      0|  if (prefixLen) {
  ------------------
  |  Branch (3711:7): [True: 0, False: 0]
  ------------------
 3712|      0|    uri += i - 1;
 3713|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3714|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3715|      0|  }
 3716|      0|  tagNamePtr->str = binding->uri;
 3717|      0|  return XML_ERROR_NONE;
 3718|      0|}
xmlparse.c:setElementTypePrefix:
 6447|  5.82k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6448|  5.82k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6449|  5.82k|  const XML_Char *name;
 6450|  92.2k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6450:34): [True: 89.6k, False: 2.62k]
  ------------------
 6451|  89.6k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|  89.6k|#  define XML_T(x) x
  ------------------
  |  Branch (6451:9): [True: 3.19k, False: 86.4k]
  ------------------
 6452|  3.19k|      PREFIX *prefix;
 6453|  3.19k|      const XML_Char *s;
 6454|  63.6k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6454:35): [True: 60.4k, False: 3.19k]
  ------------------
 6455|  60.4k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  603|  60.4k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 107, False: 60.3k]
  |  |  |  Branch (603:35): [True: 0, False: 107]
  |  |  ------------------
  |  |  604|  60.4k|       ? 0                                                                     \
  |  |  605|  60.4k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6455:13): [True: 0, False: 60.4k]
  ------------------
 6456|      0|          return 0;
 6457|  60.4k|      }
 6458|  3.19k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  3.19k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 10, False: 3.18k]
  |  |  |  Branch (603:35): [True: 0, False: 10]
  |  |  ------------------
  |  |  604|  3.19k|       ? 0                                                                     \
  |  |  605|  3.19k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6458:11): [True: 0, False: 3.19k]
  ------------------
 6459|      0|        return 0;
 6460|  3.19k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  596|  3.19k|#define poolStart(pool) ((pool)->start)
  ------------------
 6461|  3.19k|                                sizeof(PREFIX));
 6462|  3.19k|      if (! prefix)
  ------------------
  |  Branch (6462:11): [True: 0, False: 3.19k]
  ------------------
 6463|      0|        return 0;
 6464|  3.19k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|  3.19k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6464:11): [True: 2.38k, False: 809]
  ------------------
 6465|  2.38k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  2.38k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6466|    809|      else
 6467|    809|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    809|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6468|  3.19k|      elementType->prefix = prefix;
 6469|  3.19k|      break;
 6470|  3.19k|    }
 6471|  89.6k|  }
 6472|  5.82k|  return 1;
 6473|  5.82k|}
xmlparse.c:freeBindings:
 3224|  12.5k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3225|  12.5k|  while (bindings) {
  ------------------
  |  Branch (3225:10): [True: 0, False: 12.5k]
  ------------------
 3226|      0|    BINDING *b = bindings;
 3227|       |
 3228|       |    /* m_startNamespaceDeclHandler will have been called for this
 3229|       |     * binding in addBindings(), so call the end handler now.
 3230|       |     */
 3231|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3231:9): [True: 0, False: 0]
  ------------------
 3232|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3233|       |
 3234|      0|    bindings = bindings->nextTagBinding;
 3235|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3236|      0|    parser->m_freeBindingList = b;
 3237|      0|    b->prefix->binding = b->prevPrefixBinding;
 3238|      0|  }
 3239|  12.5k|}
xmlparse.c:epilogProcessor:
 5647|    145|                const char **nextPtr) {
 5648|    145|  parser->m_processor = epilogProcessor;
 5649|    145|  parser->m_eventPtr = s;
 5650|  1.14k|  for (;;) {
 5651|  1.14k|    const char *next = NULL;
 5652|  1.14k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.14k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.14k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5653|  1.14k|#ifdef XML_DTD
 5654|  1.14k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5654:9): [True: 0, False: 1.14k]
  ------------------
 5655|  1.14k|                                  XML_ACCOUNT_DIRECT)) {
 5656|      0|      accountingOnAbort(parser);
 5657|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5658|      0|    }
 5659|  1.14k|#endif
 5660|  1.14k|    parser->m_eventEndPtr = next;
 5661|  1.14k|    switch (tok) {
 5662|       |    /* report partial linebreak - it might be the last token */
 5663|      1|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      1|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5663:5): [True: 1, False: 1.14k]
  ------------------
 5664|      1|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5664:11): [True: 0, False: 1]
  ------------------
 5665|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5666|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5666:13): [True: 0, False: 0]
  ------------------
 5667|      0|          return XML_ERROR_ABORTED;
 5668|      0|      }
 5669|      1|      *nextPtr = next;
 5670|      1|      return XML_ERROR_NONE;
 5671|     72|    case XML_TOK_NONE:
  ------------------
  |  |   51|     72|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5671:5): [True: 72, False: 1.07k]
  ------------------
 5672|     72|      *nextPtr = s;
 5673|     72|      return XML_ERROR_NONE;
 5674|    344|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    344|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5674:5): [True: 344, False: 804]
  ------------------
 5675|    344|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5675:11): [True: 0, False: 344]
  ------------------
 5676|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5677|    344|      break;
 5678|    465|    case XML_TOK_PI:
  ------------------
  |  |   76|    465|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5678:5): [True: 465, False: 683]
  ------------------
 5679|    465|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5679:11): [True: 0, False: 465]
  ------------------
 5680|      0|        return XML_ERROR_NO_MEMORY;
 5681|    465|      break;
 5682|    465|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5682:5): [True: 194, False: 954]
  ------------------
 5683|    194|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5683:11): [True: 0, False: 194]
  ------------------
 5684|      0|        return XML_ERROR_NO_MEMORY;
 5685|    194|      break;
 5686|    194|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5686:5): [True: 18, False: 1.13k]
  ------------------
 5687|     18|      parser->m_eventPtr = next;
 5688|     18|      return XML_ERROR_INVALID_TOKEN;
 5689|      4|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5689:5): [True: 4, False: 1.14k]
  ------------------
 5690|      4|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5690:11): [True: 4, False: 0]
  ------------------
 5691|      4|        *nextPtr = s;
 5692|      4|        return XML_ERROR_NONE;
 5693|      4|      }
 5694|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5695|      1|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5695:5): [True: 1, False: 1.14k]
  ------------------
 5696|      1|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5696:11): [True: 1, False: 0]
  ------------------
 5697|      1|        *nextPtr = s;
 5698|      1|        return XML_ERROR_NONE;
 5699|      1|      }
 5700|      0|      return XML_ERROR_PARTIAL_CHAR;
 5701|     49|    default:
  ------------------
  |  Branch (5701:5): [True: 49, False: 1.09k]
  ------------------
 5702|     49|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5703|  1.14k|    }
 5704|  1.00k|    parser->m_eventPtr = s = next;
 5705|  1.00k|    switch (parser->m_parsingStatus.parsing) {
 5706|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5706:5): [True: 0, False: 1.00k]
  ------------------
 5707|      0|      *nextPtr = next;
 5708|      0|      return XML_ERROR_NONE;
 5709|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5709:5): [True: 0, False: 1.00k]
  ------------------
 5710|      0|      return XML_ERROR_ABORTED;
 5711|  1.00k|    default:;
  ------------------
  |  Branch (5711:5): [True: 1.00k, False: 0]
  ------------------
 5712|  1.00k|    }
 5713|  1.00k|  }
 5714|    145|}
xmlparse.c:doCdataSection:
 4027|  3.29k|               enum XML_Account account) {
 4028|  3.29k|  const char *s = *startPtr;
 4029|  3.29k|  const char **eventPP;
 4030|  3.29k|  const char **eventEndPP;
 4031|  3.29k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4031:7): [True: 1.61k, False: 1.68k]
  ------------------
 4032|  1.61k|    eventPP = &parser->m_eventPtr;
 4033|  1.61k|    *eventPP = s;
 4034|  1.61k|    eventEndPP = &parser->m_eventEndPtr;
 4035|  1.68k|  } else {
 4036|  1.68k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4037|  1.68k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4038|  1.68k|  }
 4039|  3.29k|  *eventPP = s;
 4040|  3.29k|  *startPtr = NULL;
 4041|       |
 4042|   206k|  for (;;) {
 4043|   206k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4044|   206k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|   206k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   206k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4045|   206k|#ifdef XML_DTD
 4046|   206k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4046:9): [True: 1, False: 206k]
  ------------------
 4047|      1|      accountingOnAbort(parser);
 4048|      1|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4049|      1|    }
 4050|       |#else
 4051|       |    UNUSED_P(account);
 4052|       |#endif
 4053|   206k|    *eventEndPP = next;
 4054|   206k|    switch (tok) {
 4055|  2.42k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  2.42k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4055:5): [True: 2.42k, False: 204k]
  ------------------
 4056|  2.42k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4056:11): [True: 0, False: 2.42k]
  ------------------
 4057|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4058|       |      /* BEGIN disabled code */
 4059|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4060|  2.42k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4060:16): [Folded - Ignored]
  |  Branch (4060:23): [True: 0, False: 0]
  ------------------
 4061|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4062|      0|                                       0);
 4063|       |      /* END disabled code */
 4064|  2.42k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4064:16): [True: 0, False: 2.42k]
  ------------------
 4065|      0|        reportDefault(parser, enc, s, next);
 4066|  2.42k|      *startPtr = next;
 4067|  2.42k|      *nextPtr = next;
 4068|  2.42k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4068:11): [True: 0, False: 2.42k]
  ------------------
 4069|      0|        return XML_ERROR_ABORTED;
 4070|  2.42k|      else
 4071|  2.42k|        return XML_ERROR_NONE;
 4072|   106k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   106k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4072:5): [True: 106k, False: 100k]
  ------------------
 4073|   106k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4073:11): [True: 0, False: 106k]
  ------------------
 4074|      0|        XML_Char c = 0xA;
 4075|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4076|   106k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4076:18): [True: 0, False: 106k]
  ------------------
 4077|      0|        reportDefault(parser, enc, s, next);
 4078|   106k|      break;
 4079|  96.7k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  96.7k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4079:5): [True: 96.7k, False: 109k]
  ------------------
 4080|  96.7k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4081|  96.7k|      if (charDataHandler) {
  ------------------
  |  Branch (4081:11): [True: 0, False: 96.7k]
  ------------------
 4082|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4083|      0|          for (;;) {
 4084|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4085|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4086|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4087|      0|            *eventEndPP = next;
 4088|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4089|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4090|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4090:17): [True: 0, False: 0]
  ------------------
 4091|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4091:20): [True: 0, False: 0]
  ------------------
 4092|      0|              break;
 4093|      0|            *eventPP = s;
 4094|      0|          }
 4095|      0|        } else
 4096|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4097|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4098|  96.7k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4098:18): [True: 0, False: 96.7k]
  ------------------
 4099|      0|        reportDefault(parser, enc, s, next);
 4100|  96.7k|    } break;
 4101|    163|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    163|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4101:5): [True: 163, False: 206k]
  ------------------
 4102|    163|      *eventPP = next;
 4103|    163|      return XML_ERROR_INVALID_TOKEN;
 4104|    133|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    133|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4104:5): [True: 133, False: 206k]
  ------------------
 4105|    133|      if (haveMore) {
  ------------------
  |  Branch (4105:11): [True: 133, False: 0]
  ------------------
 4106|    133|        *nextPtr = s;
 4107|    133|        return XML_ERROR_NONE;
 4108|    133|      }
 4109|      0|      return XML_ERROR_PARTIAL_CHAR;
 4110|     98|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     98|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4110:5): [True: 98, False: 206k]
  ------------------
 4111|    573|    case XML_TOK_NONE:
  ------------------
  |  |   51|    573|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4111:5): [True: 475, False: 205k]
  ------------------
 4112|    573|      if (haveMore) {
  ------------------
  |  Branch (4112:11): [True: 515, False: 58]
  ------------------
 4113|    515|        *nextPtr = s;
 4114|    515|        return XML_ERROR_NONE;
 4115|    515|      }
 4116|     58|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4117|      0|    default:
  ------------------
  |  Branch (4117:5): [True: 0, False: 206k]
  ------------------
 4118|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4119|       |       * explicit case, so this default case will never be executed.
 4120|       |       * We retain it as a safety net and exclude it from the coverage
 4121|       |       * statistics.
 4122|       |       *
 4123|       |       * LCOV_EXCL_START
 4124|       |       */
 4125|      0|      *eventPP = next;
 4126|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4127|       |      /* LCOV_EXCL_STOP */
 4128|   206k|    }
 4129|       |
 4130|   203k|    *eventPP = s = next;
 4131|   203k|    switch (parser->m_parsingStatus.parsing) {
 4132|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4132:5): [True: 0, False: 203k]
  ------------------
 4133|      0|      *nextPtr = next;
 4134|      0|      return XML_ERROR_NONE;
 4135|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4135:5): [True: 0, False: 203k]
  ------------------
 4136|      0|      return XML_ERROR_ABORTED;
 4137|   203k|    default:;
  ------------------
  |  Branch (4137:5): [True: 203k, False: 0]
  ------------------
 4138|   203k|    }
 4139|   203k|  }
 4140|       |  /* not reached */
 4141|  3.29k|}
xmlparse.c:storeRawNames:
 2572|  7.08k|storeRawNames(XML_Parser parser) {
 2573|  7.08k|  TAG *tag = parser->m_tagStack;
 2574|   102k|  while (tag) {
  ------------------
  |  Branch (2574:10): [True: 95.4k, False: 7.08k]
  ------------------
 2575|  95.4k|    int bufSize;
 2576|  95.4k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2577|  95.4k|    size_t rawNameLen;
 2578|  95.4k|    char *rawNameBuf = tag->buf + nameLen;
 2579|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2580|       |       at the first entry that has already been copied; everything
 2581|       |       below it in the stack is already been accounted for in a
 2582|       |       previous call to this function.
 2583|       |    */
 2584|  95.4k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2584:9): [True: 0, False: 95.4k]
  ------------------
 2585|      0|      break;
 2586|       |    /* For re-use purposes we need to ensure that the
 2587|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2588|       |    */
 2589|  95.4k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  197|  95.4k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2590|       |    /* Detect and prevent integer overflow. */
 2591|  95.4k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2591:9): [True: 0, False: 95.4k]
  ------------------
 2592|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2593|  95.4k|    bufSize = nameLen + (int)rawNameLen;
 2594|  95.4k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2594:9): [True: 416, False: 95.0k]
  ------------------
 2595|    416|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|    416|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2596|    416|      if (temp == NULL)
  ------------------
  |  Branch (2596:11): [True: 0, False: 416]
  ------------------
 2597|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2598|       |      /* if tag->name.str points to tag->buf (only when namespace
 2599|       |         processing is off) then we have to update it
 2600|       |      */
 2601|    416|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2601:11): [True: 416, False: 0]
  ------------------
 2602|    416|        tag->name.str = (XML_Char *)temp;
 2603|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2604|       |         then update it as well, since it will always point into tag->buf
 2605|       |      */
 2606|    416|      if (tag->name.localPart)
  ------------------
  |  Branch (2606:11): [True: 0, False: 416]
  ------------------
 2607|      0|        tag->name.localPart
 2608|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2609|    416|      tag->buf = temp;
 2610|    416|      tag->bufEnd = temp + bufSize;
 2611|    416|      rawNameBuf = temp + nameLen;
 2612|    416|    }
 2613|  95.4k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2614|  95.4k|    tag->rawName = rawNameBuf;
 2615|  95.4k|    tag = tag->parent;
 2616|  95.4k|  }
 2617|  7.08k|  return XML_TRUE;
  ------------------
  |  |   55|  7.08k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2618|  7.08k|}
xmlparse.c:getElementType:
 7615|  8.57k|               const char *end) {
 7616|  8.57k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7617|  8.57k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7618|  8.57k|  ELEMENT_TYPE *ret;
 7619|       |
 7620|  8.57k|  if (! name)
  ------------------
  |  Branch (7620:7): [True: 0, False: 8.57k]
  ------------------
 7621|      0|    return NULL;
 7622|  8.57k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7623|  8.57k|                               sizeof(ELEMENT_TYPE));
 7624|  8.57k|  if (! ret)
  ------------------
  |  Branch (7624:7): [True: 0, False: 8.57k]
  ------------------
 7625|      0|    return NULL;
 7626|  8.57k|  if (ret->name != name)
  ------------------
  |  Branch (7626:7): [True: 2.75k, False: 5.82k]
  ------------------
 7627|  2.75k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.75k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7628|  5.82k|  else {
 7629|  5.82k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  5.82k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7630|  5.82k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7630:9): [True: 0, False: 5.82k]
  ------------------
 7631|      0|      return NULL;
 7632|  5.82k|  }
 7633|  8.57k|  return ret;
 7634|  8.57k|}
xmlparse.c:getAttributeId:
 6477|  43.4k|               const char *end) {
 6478|  43.4k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6479|  43.4k|  ATTRIBUTE_ID *id;
 6480|  43.4k|  const XML_Char *name;
 6481|  43.4k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  43.4k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 292, False: 43.1k]
  |  |  |  Branch (603:35): [True: 0, False: 292]
  |  |  ------------------
  |  |  604|  43.4k|       ? 0                                                                     \
  |  |  605|  43.4k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6481:7): [True: 0, False: 43.4k]
  ------------------
 6482|      0|    return NULL;
 6483|  43.4k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6484|  43.4k|  if (! name)
  ------------------
  |  Branch (6484:7): [True: 0, False: 43.4k]
  ------------------
 6485|      0|    return NULL;
 6486|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6487|  43.4k|  ++name;
 6488|  43.4k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6489|  43.4k|                              sizeof(ATTRIBUTE_ID));
 6490|  43.4k|  if (! id)
  ------------------
  |  Branch (6490:7): [True: 0, False: 43.4k]
  ------------------
 6491|      0|    return NULL;
 6492|  43.4k|  if (id->name != name)
  ------------------
  |  Branch (6492:7): [True: 36.5k, False: 6.84k]
  ------------------
 6493|  36.5k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  36.5k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6494|  6.84k|  else {
 6495|  6.84k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  6.84k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6496|  6.84k|    if (! parser->m_ns)
  ------------------
  |  Branch (6496:9): [True: 6.84k, False: 0]
  ------------------
 6497|  6.84k|      ;
 6498|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:14): [True: 0, False: 0]
  |  Branch (6498:43): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  |  Branch (6499:46): [True: 0, False: 0]
  ------------------
 6500|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:17): [True: 0, False: 0]
  ------------------
 6501|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:18): [True: 0, False: 0]
  |  Branch (6501:44): [True: 0, False: 0]
  ------------------
 6502|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6502:11): [True: 0, False: 0]
  ------------------
 6503|      0|        id->prefix = &dtd->defaultPrefix;
 6504|      0|      else
 6505|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6506|      0|                                      sizeof(PREFIX));
 6507|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6508|      0|    } else {
 6509|      0|      int i;
 6510|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6510:19): [True: 0, False: 0]
  ------------------
 6511|       |        /* attributes without prefix are *not* in the default namespace */
 6512|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6512:13): [True: 0, False: 0]
  ------------------
 6513|      0|          int j;
 6514|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6514:23): [True: 0, False: 0]
  ------------------
 6515|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6515:17): [True: 0, False: 0]
  ------------------
 6516|      0|              return NULL;
 6517|      0|          }
 6518|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6518:15): [True: 0, False: 0]
  ------------------
 6519|      0|            return NULL;
 6520|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6521|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6522|      0|          if (! id->prefix)
  ------------------
  |  Branch (6522:15): [True: 0, False: 0]
  ------------------
 6523|      0|            return NULL;
 6524|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6524:15): [True: 0, False: 0]
  ------------------
 6525|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6526|      0|          else
 6527|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6528|      0|          break;
 6529|      0|        }
 6530|      0|      }
 6531|      0|    }
 6532|  6.84k|  }
 6533|  43.4k|  return id;
 6534|  43.4k|}
xmlparse.c:poolAppend:
 7221|  20.3M|           const char *end) {
 7222|  20.3M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7222:7): [True: 22.3k, False: 20.3M]
  |  Branch (7222:22): [True: 0, False: 22.3k]
  ------------------
 7223|      0|    return NULL;
 7224|  20.3M|  for (;;) {
 7225|  20.3M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|  20.3M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  20.3M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7226|  20.3M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7227|  20.3M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7227:9): [True: 20.3M, False: 13.0k]
  ------------------
 7228|  20.3M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7228:12): [True: 0, False: 13.0k]
  ------------------
 7229|  20.3M|      break;
 7230|  13.0k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7230:9): [True: 0, False: 13.0k]
  ------------------
 7231|      0|      return NULL;
 7232|  13.0k|  }
 7233|  20.3M|  return pool->start;
 7234|  20.3M|}
xmlparse.c:defineAttribute:
 6387|  21.9k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6388|  21.9k|  DEFAULT_ATTRIBUTE *att;
 6389|  21.9k|  if (value || isId) {
  ------------------
  |  Branch (6389:7): [True: 13.7k, False: 8.12k]
  |  Branch (6389:16): [True: 578, False: 7.54k]
  ------------------
 6390|       |    /* The handling of default attributes gets messed up if we have
 6391|       |       a default which duplicates a non-default. */
 6392|  14.3k|    int i;
 6393|  55.2k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6393:17): [True: 52.5k, False: 2.65k]
  ------------------
 6394|  52.5k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6394:11): [True: 11.6k, False: 40.8k]
  ------------------
 6395|  11.6k|        return 1;
 6396|  2.65k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6396:9): [True: 311, False: 2.34k]
  |  Branch (6396:17): [True: 112, False: 199]
  |  Branch (6396:34): [True: 112, False: 0]
  ------------------
 6397|    112|      type->idAtt = attId;
 6398|  2.65k|  }
 6399|  10.2k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6399:7): [True: 1.24k, False: 8.96k]
  ------------------
 6400|  1.24k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6400:9): [True: 979, False: 268]
  ------------------
 6401|    979|      type->allocDefaultAtts = 8;
 6402|    979|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  714|    979|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6403|    979|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6404|    979|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6404:11): [True: 0, False: 979]
  ------------------
 6405|      0|        type->allocDefaultAtts = 0;
 6406|      0|        return 0;
 6407|      0|      }
 6408|    979|    } else {
 6409|    268|      DEFAULT_ATTRIBUTE *temp;
 6410|       |
 6411|       |      /* Detect and prevent integer overflow */
 6412|    268|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6412:11): [True: 0, False: 268]
  ------------------
 6413|      0|        return 0;
 6414|      0|      }
 6415|       |
 6416|    268|      int count = type->allocDefaultAtts * 2;
 6417|       |
 6418|       |      /* Detect and prevent integer overflow.
 6419|       |       * The preprocessor guard addresses the "always false" warning
 6420|       |       * from -Wtype-limits on platforms where
 6421|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6422|       |#if UINT_MAX >= SIZE_MAX
 6423|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6424|       |        return 0;
 6425|       |      }
 6426|       |#endif
 6427|       |
 6428|    268|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  715|    268|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6429|    268|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6430|    268|      if (temp == NULL)
  ------------------
  |  Branch (6430:11): [True: 0, False: 268]
  ------------------
 6431|      0|        return 0;
 6432|    268|      type->allocDefaultAtts = count;
 6433|    268|      type->defaultAtts = temp;
 6434|    268|    }
 6435|  1.24k|  }
 6436|  10.2k|  att = type->defaultAtts + type->nDefaultAtts;
 6437|  10.2k|  att->id = attId;
 6438|  10.2k|  att->value = value;
 6439|  10.2k|  att->isCdata = isCdata;
 6440|  10.2k|  if (! isCdata)
  ------------------
  |  Branch (6440:7): [True: 9.76k, False: 447]
  ------------------
 6441|  9.76k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  9.76k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6442|  10.2k|  type->nDefaultAtts += 1;
 6443|  10.2k|  return 1;
 6444|  10.2k|}
xmlparse.c:poolGrow:
 7322|  50.0k|poolGrow(STRING_POOL *pool) {
 7323|  50.0k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7323:7): [True: 19.7k, False: 30.2k]
  ------------------
 7324|  19.7k|    if (pool->start == 0) {
  ------------------
  |  Branch (7324:9): [True: 17.8k, False: 1.93k]
  ------------------
 7325|  17.8k|      pool->blocks = pool->freeBlocks;
 7326|  17.8k|      pool->freeBlocks = pool->freeBlocks->next;
 7327|  17.8k|      pool->blocks->next = NULL;
 7328|  17.8k|      pool->start = pool->blocks->s;
 7329|  17.8k|      pool->end = pool->start + pool->blocks->size;
 7330|  17.8k|      pool->ptr = pool->start;
 7331|  17.8k|      return XML_TRUE;
  ------------------
  |  |   55|  17.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7332|  17.8k|    }
 7333|  1.93k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7333:9): [True: 1.66k, False: 273]
  ------------------
 7334|  1.66k|      BLOCK *tem = pool->freeBlocks->next;
 7335|  1.66k|      pool->freeBlocks->next = pool->blocks;
 7336|  1.66k|      pool->blocks = pool->freeBlocks;
 7337|  1.66k|      pool->freeBlocks = tem;
 7338|  1.66k|      memcpy(pool->blocks->s, pool->start,
 7339|  1.66k|             (pool->end - pool->start) * sizeof(XML_Char));
 7340|  1.66k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7341|  1.66k|      pool->start = pool->blocks->s;
 7342|  1.66k|      pool->end = pool->start + pool->blocks->size;
 7343|  1.66k|      return XML_TRUE;
  ------------------
  |  |   55|  1.66k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7344|  1.66k|    }
 7345|  1.93k|  }
 7346|  30.5k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7346:7): [True: 13.0k, False: 17.5k]
  |  Branch (7346:23): [True: 9.19k, False: 3.81k]
  ------------------
 7347|  9.19k|    BLOCK *temp;
 7348|  9.19k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7349|  9.19k|    size_t bytesToAllocate;
 7350|       |
 7351|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7352|       |             to avoid dangling pointers: */
 7353|  9.19k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7354|       |
 7355|  9.19k|    if (blockSize < 0) {
  ------------------
  |  Branch (7355:9): [True: 0, False: 9.19k]
  ------------------
 7356|       |      /* This condition traps a situation where either more than
 7357|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7358|       |       * readily testable, since it is unlikely that an average
 7359|       |       * machine will have that much memory, so we exclude it from the
 7360|       |       * coverage statistics.
 7361|       |       */
 7362|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7363|      0|    }
 7364|       |
 7365|  9.19k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7366|  9.19k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7366:9): [True: 0, False: 9.19k]
  ------------------
 7367|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7368|       |
 7369|  9.19k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7370|  9.19k|                                           (unsigned)bytesToAllocate);
 7371|  9.19k|    if (temp == NULL)
  ------------------
  |  Branch (7371:9): [True: 0, False: 9.19k]
  ------------------
 7372|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7373|  9.19k|    pool->blocks = temp;
 7374|  9.19k|    pool->blocks->size = blockSize;
 7375|  9.19k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7376|  9.19k|    pool->start = pool->blocks->s;
 7377|  9.19k|    pool->end = pool->start + blockSize;
 7378|  21.3k|  } else {
 7379|  21.3k|    BLOCK *tem;
 7380|  21.3k|    int blockSize = (int)(pool->end - pool->start);
 7381|  21.3k|    size_t bytesToAllocate;
 7382|       |
 7383|  21.3k|    if (blockSize < 0) {
  ------------------
  |  Branch (7383:9): [True: 0, False: 21.3k]
  ------------------
 7384|       |      /* This condition traps a situation where either more than
 7385|       |       * INT_MAX bytes have already been allocated (which is prevented
 7386|       |       * by various pieces of program logic, not least this one, never
 7387|       |       * mind the unlikelihood of actually having that much memory) or
 7388|       |       * the pool control fields have been corrupted (which could
 7389|       |       * conceivably happen in an extremely buggy user handler
 7390|       |       * function).  Either way it isn't readily testable, so we
 7391|       |       * exclude it from the coverage statistics.
 7392|       |       */
 7393|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7394|      0|    }
 7395|       |
 7396|  21.3k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  246|  21.3k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7396:9): [True: 20.9k, False: 369]
  ------------------
 7397|  20.9k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  246|  20.9k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7398|    369|    else {
 7399|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7400|    369|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7400:11): [True: 0, False: 369]
  ------------------
 7401|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7402|      0|      }
 7403|    369|      blockSize *= 2;
 7404|    369|    }
 7405|       |
 7406|  21.3k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7407|  21.3k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7407:9): [True: 0, False: 21.3k]
  ------------------
 7408|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7409|       |
 7410|  21.3k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7411|  21.3k|    if (! tem)
  ------------------
  |  Branch (7411:9): [True: 0, False: 21.3k]
  ------------------
 7412|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7413|  21.3k|    tem->size = blockSize;
 7414|  21.3k|    tem->next = pool->blocks;
 7415|  21.3k|    pool->blocks = tem;
 7416|  21.3k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7416:9): [True: 3.50k, False: 17.8k]
  ------------------
 7417|  3.50k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7418|  21.3k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7419|  21.3k|    pool->start = tem->s;
 7420|  21.3k|    pool->end = tem->s + blockSize;
 7421|  21.3k|  }
 7422|  30.5k|  return XML_TRUE;
  ------------------
  |  |   55|  30.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7423|  30.5k|}
xmlparse.c:poolBytesToAllocateFor:
 7294|  30.5k|poolBytesToAllocateFor(int blockSize) {
 7295|       |  /* Unprotected math would be:
 7296|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7297|       |  **
 7298|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7299|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7300|       |  ** on top has no chance of making us accept a small non-negative number
 7301|       |  */
 7302|  30.5k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7303|       |
 7304|  30.5k|  if (blockSize <= 0)
  ------------------
  |  Branch (7304:7): [True: 0, False: 30.5k]
  ------------------
 7305|      0|    return 0;
 7306|       |
 7307|  30.5k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7307:7): [True: 0, False: 30.5k]
  ------------------
 7308|      0|    return 0;
 7309|       |
 7310|  30.5k|  {
 7311|  30.5k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7312|  30.5k|    const int bytesToAllocate
 7313|  30.5k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7314|  30.5k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7314:9): [True: 0, False: 30.5k]
  ------------------
 7315|      0|      return 0;
 7316|       |
 7317|  30.5k|    return (size_t)bytesToAllocate;
 7318|  30.5k|  }
 7319|  30.5k|}
xmlparse.c:storeAttributeValue:
 5872|  22.9k|                    enum XML_Account account) {
 5873|  22.9k|  enum XML_Error result
 5874|  22.9k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5875|  22.9k|  if (result)
  ------------------
  |  Branch (5875:7): [True: 215, False: 22.7k]
  ------------------
 5876|    215|    return result;
 5877|  22.7k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  597|  37.2k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (597:26): [True: 6.43k, False: 8.09k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  599|  6.43k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5877:7): [True: 14.5k, False: 8.17k]
  |  Branch (5877:40): [True: 619, False: 5.81k]
  ------------------
 5878|    619|    poolChop(pool);
  ------------------
  |  |  598|    619|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5879|  22.7k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  603|  22.7k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 876, False: 21.8k]
  |  |  |  Branch (603:35): [True: 0, False: 876]
  |  |  ------------------
  |  |  604|  22.7k|       ? 0                                                                     \
  |  |  605|  22.7k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5879:7): [True: 0, False: 22.7k]
  ------------------
 5880|      0|    return XML_ERROR_NO_MEMORY;
 5881|  22.7k|  return XML_ERROR_NONE;
 5882|  22.7k|}
xmlparse.c:appendAttributeValue:
 5887|   654k|                     enum XML_Account account) {
 5888|   654k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5889|       |#ifndef XML_DTD
 5890|       |  UNUSED_P(account);
 5891|       |#endif
 5892|       |
 5893|  54.2M|  for (;;) {
 5894|  54.2M|    const char *next
 5895|  54.2M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5896|  54.2M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|  54.2M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  54.2M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5897|  54.2M|#ifdef XML_DTD
 5898|  54.2M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5898:9): [True: 34, False: 54.2M]
  ------------------
 5899|     34|      accountingOnAbort(parser);
 5900|     34|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5901|     34|    }
 5902|  54.2M|#endif
 5903|  54.2M|    switch (tok) {
 5904|   654k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   654k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5904:5): [True: 654k, False: 53.5M]
  ------------------
 5905|   654k|      return XML_ERROR_NONE;
 5906|      9|    case XML_TOK_INVALID:
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5906:5): [True: 9, False: 54.2M]
  ------------------
 5907|      9|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5907:11): [True: 6, False: 3]
  ------------------
 5908|      6|        parser->m_eventPtr = next;
 5909|      9|      return XML_ERROR_INVALID_TOKEN;
 5910|      3|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5910:5): [True: 3, False: 54.2M]
  ------------------
 5911|      3|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5911:11): [True: 2, False: 1]
  ------------------
 5912|      2|        parser->m_eventPtr = ptr;
 5913|      3|      return XML_ERROR_INVALID_TOKEN;
 5914|  5.52k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  5.52k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5914:5): [True: 5.52k, False: 54.2M]
  ------------------
 5915|  5.52k|      XML_Char buf[XML_ENCODE_MAX];
 5916|  5.52k|      int i;
 5917|  5.52k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  5.52k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5918|  5.52k|      if (n < 0) {
  ------------------
  |  Branch (5918:11): [True: 39, False: 5.48k]
  ------------------
 5919|     39|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5919:13): [True: 38, False: 1]
  ------------------
 5920|     38|          parser->m_eventPtr = ptr;
 5921|     39|        return XML_ERROR_BAD_CHAR_REF;
 5922|     39|      }
 5923|  5.48k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5923:11): [True: 1.02k, False: 4.45k]
  |  Branch (5923:24): [True: 778, False: 248]
  ------------------
 5924|  5.48k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|    778|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|    456|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5924:15): [True: 322, False: 456]
  |  Branch (5924:40): [True: 203, False: 253]
  ------------------
 5925|    525|        break;
 5926|  4.95k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  4.95k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5927|       |      /* The XmlEncode() functions can never return 0 here.  That
 5928|       |       * error return happens if the code point passed in is either
 5929|       |       * negative or greater than or equal to 0x110000.  The
 5930|       |       * XmlCharRefNumber() functions will all return a number
 5931|       |       * strictly less than 0x110000 or a negative value if an error
 5932|       |       * occurred.  The negative value is intercepted above, so
 5933|       |       * XmlEncode() is never passed a value it might return an
 5934|       |       * error for.
 5935|       |       */
 5936|  15.1k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5936:19): [True: 10.2k, False: 4.95k]
  ------------------
 5937|  10.2k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  603|  10.2k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 347, False: 9.87k]
  |  |  |  Branch (603:35): [True: 0, False: 347]
  |  |  ------------------
  |  |  604|  10.2k|       ? 0                                                                     \
  |  |  605|  10.2k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5937:13): [True: 0, False: 10.2k]
  ------------------
 5938|      0|          return XML_ERROR_NO_MEMORY;
 5939|  10.2k|      }
 5940|  4.95k|    } break;
 5941|  19.3M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  19.3M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5941:5): [True: 19.3M, False: 34.9M]
  ------------------
 5942|  19.3M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5942:11): [True: 0, False: 19.3M]
  ------------------
 5943|      0|        return XML_ERROR_NO_MEMORY;
 5944|  19.3M|      break;
 5945|  19.3M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.50k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5945:5): [True: 1.50k, False: 54.2M]
  ------------------
 5946|  1.50k|      next = ptr + enc->minBytesPerChar;
 5947|       |      /* fall through */
 5948|  3.21M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  3.21M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5948:5): [True: 3.21M, False: 51.0M]
  ------------------
 5949|  32.5M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  32.5M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5949:5): [True: 29.3M, False: 24.8M]
  ------------------
 5950|  32.5M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|  46.7k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|  45.4k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5950:11): [True: 46.7k, False: 32.5M]
  |  Branch (5950:25): [True: 1.38k, False: 45.4k]
  |  Branch (5950:50): [True: 8.02k, False: 37.3k]
  ------------------
 5951|  9.41k|        break;
 5952|  32.5M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  603|  32.5M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 2.03k, False: 32.5M]
  |  |  |  Branch (603:35): [True: 0, False: 2.03k]
  |  |  ------------------
  |  |  604|  32.5M|       ? 0                                                                     \
  |  |  605|  32.5M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5952:11): [True: 0, False: 32.5M]
  ------------------
 5953|      0|        return XML_ERROR_NO_MEMORY;
 5954|  32.5M|      break;
 5955|  32.5M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|  1.67M|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5955:5): [True: 1.67M, False: 52.5M]
  ------------------
 5956|  1.67M|      const XML_Char *name;
 5957|  1.67M|      ENTITY *entity;
 5958|  1.67M|      char checkEntityDecl;
 5959|  1.67M|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|  1.67M|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5960|  1.67M|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5961|  1.67M|      if (ch) {
  ------------------
  |  Branch (5961:11): [True: 1.03M, False: 648k]
  ------------------
 5962|  1.03M|#ifdef XML_DTD
 5963|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5964|       |         *       so there is no amplification and hence recording without
 5965|       |         *       protection. */
 5966|  1.03M|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5967|  1.03M|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5968|  1.03M|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5969|  1.03M|#endif /* XML_DTD */
 5970|  1.03M|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  603|  1.03M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 257, False: 1.02M]
  |  |  |  Branch (603:35): [True: 0, False: 257]
  |  |  ------------------
  |  |  604|  1.03M|       ? 0                                                                     \
  |  |  605|  1.03M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5970:13): [True: 0, False: 1.03M]
  ------------------
 5971|      0|          return XML_ERROR_NO_MEMORY;
 5972|  1.03M|        break;
 5973|  1.03M|      }
 5974|   648k|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5975|   648k|                             ptr + enc->minBytesPerChar,
 5976|   648k|                             next - enc->minBytesPerChar);
 5977|   648k|      if (! name)
  ------------------
  |  Branch (5977:11): [True: 0, False: 648k]
  ------------------
 5978|      0|        return XML_ERROR_NO_MEMORY;
 5979|   648k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5980|   648k|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  600|   648k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5981|       |      /* First, determine if a check for an existing declaration is needed;
 5982|       |         if yes, check that the entity exists, and that it is internal.
 5983|       |      */
 5984|   648k|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5984:11): [True: 11.0k, False: 637k]
  ------------------
 5985|  11.0k|        checkEntityDecl =
 5986|  11.0k|#ifdef XML_DTD
 5987|  11.0k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5987:13): [True: 11.0k, False: 0]
  ------------------
 5988|  11.0k|#endif /* XML_DTD */
 5989|  11.0k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5989:13): [True: 11.0k, False: 0]
  |  Branch (5989:14): [True: 198, False: 10.8k]
  ------------------
 5990|  11.0k|                             : ! dtd->hasParamEntityRefs);
 5991|   637k|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5992|   637k|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5992:27): [True: 457k, False: 180k]
  |  Branch (5992:56): [True: 0, False: 180k]
  ------------------
 5993|   648k|      if (checkEntityDecl) {
  ------------------
  |  Branch (5993:11): [True: 468k, False: 180k]
  ------------------
 5994|   468k|        if (! entity)
  ------------------
  |  Branch (5994:13): [True: 123, False: 468k]
  ------------------
 5995|    123|          return XML_ERROR_UNDEFINED_ENTITY;
 5996|   468k|        else if (! entity->is_internal)
  ------------------
  |  Branch (5996:18): [True: 0, False: 468k]
  ------------------
 5997|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5998|   468k|      } else if (! entity) {
  ------------------
  |  Branch (5998:18): [True: 17.1k, False: 163k]
  ------------------
 5999|       |        /* Cannot report skipped entity here - see comments on
 6000|       |           parser->m_skippedEntityHandler.
 6001|       |        if (parser->m_skippedEntityHandler)
 6002|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6003|       |        */
 6004|       |        /* Cannot call the default handler because this would be
 6005|       |           out of sync with the call to the startElementHandler.
 6006|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6007|       |          reportDefault(parser, enc, ptr, next);
 6008|       |        */
 6009|  17.1k|        break;
 6010|  17.1k|      }
 6011|   631k|      if (entity->open) {
  ------------------
  |  Branch (6011:11): [True: 5, False: 631k]
  ------------------
 6012|      5|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6012:13): [True: 0, False: 5]
  ------------------
 6013|       |          /* It does not appear that this line can be executed.
 6014|       |           *
 6015|       |           * The "if (entity->open)" check catches recursive entity
 6016|       |           * definitions.  In order to be called with an open
 6017|       |           * entity, it must have gone through this code before and
 6018|       |           * been through the recursive call to
 6019|       |           * appendAttributeValue() some lines below.  That call
 6020|       |           * sets the local encoding ("enc") to the parser's
 6021|       |           * internal encoding (internal_utf8 or internal_utf16),
 6022|       |           * which can never be the same as the principle encoding.
 6023|       |           * It doesn't appear there is another code path that gets
 6024|       |           * here with entity->open being TRUE.
 6025|       |           *
 6026|       |           * Since it is not certain that this logic is watertight,
 6027|       |           * we keep the line and merely exclude it from coverage
 6028|       |           * tests.
 6029|       |           */
 6030|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6031|      0|        }
 6032|      5|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6033|      5|      }
 6034|   631k|      if (entity->notation) {
  ------------------
  |  Branch (6034:11): [True: 0, False: 631k]
  ------------------
 6035|      0|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6035:13): [True: 0, False: 0]
  ------------------
 6036|      0|          parser->m_eventPtr = ptr;
 6037|      0|        return XML_ERROR_BINARY_ENTITY_REF;
 6038|      0|      }
 6039|   631k|      if (! entity->textPtr) {
  ------------------
  |  Branch (6039:11): [True: 2, False: 631k]
  ------------------
 6040|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6040:13): [True: 1, False: 1]
  ------------------
 6041|      1|          parser->m_eventPtr = ptr;
 6042|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6043|   631k|      } else {
 6044|   631k|        enum XML_Error result;
 6045|   631k|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6046|   631k|        entity->open = XML_TRUE;
  ------------------
  |  |   55|   631k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6047|   631k|#ifdef XML_DTD
 6048|   631k|        entityTrackingOnOpen(parser, entity, __LINE__);
 6049|   631k|#endif
 6050|   631k|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6051|   631k|                                      isCdata, (const char *)entity->textPtr,
 6052|   631k|                                      (const char *)textEnd, pool,
 6053|   631k|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6054|   631k|#ifdef XML_DTD
 6055|   631k|        entityTrackingOnClose(parser, entity, __LINE__);
 6056|   631k|#endif
 6057|   631k|        entity->open = XML_FALSE;
  ------------------
  |  |   56|   631k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6058|   631k|        if (result)
  ------------------
  |  Branch (6058:13): [True: 61, False: 631k]
  ------------------
 6059|     61|          return result;
 6060|   631k|      }
 6061|   631k|    } break;
 6062|   631k|    default:
  ------------------
  |  Branch (6062:5): [True: 0, False: 54.2M]
  ------------------
 6063|       |      /* The only token returned by XmlAttributeValueTok() that does
 6064|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6065|       |       * Getting that would require an entity name to contain an
 6066|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6067|       |       * tokenisers will have already recognised and rejected such
 6068|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6069|       |       * default case should be retained as a safety net, but the code
 6070|       |       * excluded from coverage tests.
 6071|       |       *
 6072|       |       * LCOV_EXCL_START
 6073|       |       */
 6074|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6074:11): [True: 0, False: 0]
  ------------------
 6075|      0|        parser->m_eventPtr = ptr;
 6076|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6077|       |      /* LCOV_EXCL_STOP */
 6078|  54.2M|    }
 6079|  53.5M|    ptr = next;
 6080|  53.5M|  }
 6081|       |  /* not reached */
 6082|   654k|}
xmlparse.c:storeEntityValue:
 6087|  7.55k|                 enum XML_Account account) {
 6088|  7.55k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6089|  7.55k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6090|  7.55k|  enum XML_Error result = XML_ERROR_NONE;
 6091|  7.55k|#ifdef XML_DTD
 6092|  7.55k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6093|  7.55k|  parser->m_prologState.inEntityValue = 1;
 6094|       |#else
 6095|       |  UNUSED_P(account);
 6096|       |#endif /* XML_DTD */
 6097|       |  /* never return Null for the value argument in EntityDeclHandler,
 6098|       |     since this would indicate an external entity; therefore we
 6099|       |     have to make sure that entityValuePool.start is not null */
 6100|  7.55k|  if (! pool->blocks) {
  ------------------
  |  Branch (6100:7): [True: 2.45k, False: 5.10k]
  ------------------
 6101|  2.45k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6101:9): [True: 0, False: 2.45k]
  ------------------
 6102|      0|      return XML_ERROR_NO_MEMORY;
 6103|  2.45k|  }
 6104|       |
 6105|  1.22M|  for (;;) {
 6106|  1.22M|    const char *next
 6107|  1.22M|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6108|  1.22M|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|  1.22M|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  1.22M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6109|       |
 6110|  1.22M|#ifdef XML_DTD
 6111|  1.22M|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6111:9): [True: 0, False: 1.22M]
  ------------------
 6112|  1.22M|                                  account)) {
 6113|      0|      accountingOnAbort(parser);
 6114|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6115|      0|      goto endEntityValue;
 6116|      0|    }
 6117|  1.22M|#endif
 6118|       |
 6119|  1.22M|    switch (tok) {
 6120|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6120:5): [True: 2, False: 1.22M]
  ------------------
 6121|      2|#ifdef XML_DTD
 6122|      2|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6122:11): [True: 0, False: 2]
  |  Branch (6122:38): [True: 0, False: 2]
  ------------------
 6123|      0|        const XML_Char *name;
 6124|      0|        ENTITY *entity;
 6125|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6126|      0|                               entityTextPtr + enc->minBytesPerChar,
 6127|      0|                               next - enc->minBytesPerChar);
 6128|      0|        if (! name) {
  ------------------
  |  Branch (6128:13): [True: 0, False: 0]
  ------------------
 6129|      0|          result = XML_ERROR_NO_MEMORY;
 6130|      0|          goto endEntityValue;
 6131|      0|        }
 6132|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6133|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6134|      0|        if (! entity) {
  ------------------
  |  Branch (6134:13): [True: 0, False: 0]
  ------------------
 6135|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6136|       |          /* cannot report skipped entity here - see comments on
 6137|       |             parser->m_skippedEntityHandler
 6138|       |          if (parser->m_skippedEntityHandler)
 6139|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6140|       |          */
 6141|      0|          dtd->keepProcessing = dtd->standalone;
 6142|      0|          goto endEntityValue;
 6143|      0|        }
 6144|      0|        if (entity->open) {
  ------------------
  |  Branch (6144:13): [True: 0, False: 0]
  ------------------
 6145|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6145:15): [True: 0, False: 0]
  ------------------
 6146|      0|            parser->m_eventPtr = entityTextPtr;
 6147|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6148|      0|          goto endEntityValue;
 6149|      0|        }
 6150|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6150:13): [True: 0, False: 0]
  ------------------
 6151|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6151:15): [True: 0, False: 0]
  ------------------
 6152|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6153|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6154|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6155|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6155:17): [True: 0, False: 0]
  ------------------
 6156|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6157|      0|                    entity->systemId, entity->publicId)) {
 6158|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6159|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6160|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6161|      0|              goto endEntityValue;
 6162|      0|            }
 6163|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6164|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6165|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6165:17): [True: 0, False: 0]
  ------------------
 6166|      0|              dtd->keepProcessing = dtd->standalone;
 6167|      0|          } else
 6168|      0|            dtd->keepProcessing = dtd->standalone;
 6169|      0|        } else {
 6170|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6171|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6172|      0|          result = storeEntityValue(
 6173|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6174|      0|              (const char *)(entity->textPtr + entity->textLen),
 6175|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6176|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6177|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6178|      0|          if (result)
  ------------------
  |  Branch (6178:15): [True: 0, False: 0]
  ------------------
 6179|      0|            goto endEntityValue;
 6180|      0|        }
 6181|      0|        break;
 6182|      0|      }
 6183|      2|#endif /* XML_DTD */
 6184|       |      /* In the internal subset, PE references are not legal
 6185|       |         within markup declarations, e.g entity values in this case. */
 6186|      2|      parser->m_eventPtr = entityTextPtr;
 6187|      2|      result = XML_ERROR_PARAM_ENTITY_REF;
 6188|      2|      goto endEntityValue;
 6189|  7.48k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  7.48k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6189:5): [True: 7.48k, False: 1.21M]
  ------------------
 6190|  7.48k|      result = XML_ERROR_NONE;
 6191|  7.48k|      goto endEntityValue;
 6192|  13.4k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  13.4k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6192:5): [True: 13.4k, False: 1.20M]
  ------------------
 6193|   139k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   139k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6193:5): [True: 125k, False: 1.09M]
  ------------------
 6194|   139k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6194:11): [True: 0, False: 139k]
  ------------------
 6195|      0|        result = XML_ERROR_NO_MEMORY;
 6196|      0|        goto endEntityValue;
 6197|      0|      }
 6198|   139k|      break;
 6199|   139k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.03k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6199:5): [True: 1.03k, False: 1.22M]
  ------------------
 6200|  1.03k|      next = entityTextPtr + enc->minBytesPerChar;
 6201|       |      /* fall through */
 6202|  1.06M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  1.06M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6202:5): [True: 1.06M, False: 155k]
  ------------------
 6203|  1.06M|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6203:11): [True: 66, False: 1.06M]
  |  Branch (6203:37): [True: 0, False: 66]
  ------------------
 6204|      0|        result = XML_ERROR_NO_MEMORY;
 6205|      0|        goto endEntityValue;
 6206|      0|      }
 6207|  1.06M|      *(pool->ptr)++ = 0xA;
 6208|  1.06M|      break;
 6209|  7.58k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  7.58k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6209:5): [True: 7.58k, False: 1.21M]
  ------------------
 6210|  7.58k|      XML_Char buf[XML_ENCODE_MAX];
 6211|  7.58k|      int i;
 6212|  7.58k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  7.58k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6213|  7.58k|      if (n < 0) {
  ------------------
  |  Branch (6213:11): [True: 4, False: 7.58k]
  ------------------
 6214|      4|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6214:13): [True: 4, False: 0]
  ------------------
 6215|      4|          parser->m_eventPtr = entityTextPtr;
 6216|      4|        result = XML_ERROR_BAD_CHAR_REF;
 6217|      4|        goto endEntityValue;
 6218|      4|      }
 6219|  7.58k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  7.58k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6220|       |      /* The XmlEncode() functions can never return 0 here.  That
 6221|       |       * error return happens if the code point passed in is either
 6222|       |       * negative or greater than or equal to 0x110000.  The
 6223|       |       * XmlCharRefNumber() functions will all return a number
 6224|       |       * strictly less than 0x110000 or a negative value if an error
 6225|       |       * occurred.  The negative value is intercepted above, so
 6226|       |       * XmlEncode() is never passed a value it might return an
 6227|       |       * error for.
 6228|       |       */
 6229|  30.4k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6229:19): [True: 22.8k, False: 7.58k]
  ------------------
 6230|  22.8k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6230:13): [True: 13, False: 22.8k]
  |  Branch (6230:39): [True: 0, False: 13]
  ------------------
 6231|      0|          result = XML_ERROR_NO_MEMORY;
 6232|      0|          goto endEntityValue;
 6233|      0|        }
 6234|  22.8k|        *(pool->ptr)++ = buf[i];
 6235|  22.8k|      }
 6236|  7.58k|    } break;
 6237|  7.58k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     49|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6237:5): [True: 49, False: 1.22M]
  ------------------
 6238|     49|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6238:11): [True: 49, False: 0]
  ------------------
 6239|     49|        parser->m_eventPtr = entityTextPtr;
 6240|     49|      result = XML_ERROR_INVALID_TOKEN;
 6241|     49|      goto endEntityValue;
 6242|     21|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6242:5): [True: 21, False: 1.22M]
  ------------------
 6243|     21|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6243:11): [True: 21, False: 0]
  ------------------
 6244|     21|        parser->m_eventPtr = next;
 6245|     21|      result = XML_ERROR_INVALID_TOKEN;
 6246|     21|      goto endEntityValue;
 6247|      0|    default:
  ------------------
  |  Branch (6247:5): [True: 0, False: 1.22M]
  ------------------
 6248|       |      /* This default case should be unnecessary -- all the tokens
 6249|       |       * that XmlEntityValueTok() can return have their own explicit
 6250|       |       * cases -- but should be retained for safety.  We do however
 6251|       |       * exclude it from the coverage statistics.
 6252|       |       *
 6253|       |       * LCOV_EXCL_START
 6254|       |       */
 6255|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6255:11): [True: 0, False: 0]
  ------------------
 6256|      0|        parser->m_eventPtr = entityTextPtr;
 6257|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6258|      0|      goto endEntityValue;
 6259|       |      /* LCOV_EXCL_STOP */
 6260|  1.22M|    }
 6261|  1.21M|    entityTextPtr = next;
 6262|  1.21M|  }
 6263|  7.55k|endEntityValue:
 6264|  7.55k|#ifdef XML_DTD
 6265|  7.55k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6266|  7.55k|#endif /* XML_DTD */
 6267|  7.55k|  return result;
 6268|  7.55k|}
xmlparse.c:processInternalEntity:
 5717|   159k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5718|   159k|  const char *textStart, *textEnd;
 5719|   159k|  const char *next;
 5720|   159k|  enum XML_Error result;
 5721|   159k|  OPEN_INTERNAL_ENTITY *openEntity;
 5722|       |
 5723|   159k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5723:7): [True: 157k, False: 1.65k]
  ------------------
 5724|   157k|    openEntity = parser->m_freeInternalEntities;
 5725|   157k|    parser->m_freeInternalEntities = openEntity->next;
 5726|   157k|  } else {
 5727|  1.65k|    openEntity
 5728|  1.65k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  714|  1.65k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5729|  1.65k|    if (! openEntity)
  ------------------
  |  Branch (5729:9): [True: 0, False: 1.65k]
  ------------------
 5730|      0|      return XML_ERROR_NO_MEMORY;
 5731|  1.65k|  }
 5732|   159k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   159k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5733|   159k|#ifdef XML_DTD
 5734|   159k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5735|   159k|#endif
 5736|   159k|  entity->processed = 0;
 5737|   159k|  openEntity->next = parser->m_openInternalEntities;
 5738|   159k|  parser->m_openInternalEntities = openEntity;
 5739|   159k|  openEntity->entity = entity;
 5740|   159k|  openEntity->startTagLevel = parser->m_tagLevel;
 5741|   159k|  openEntity->betweenDecl = betweenDecl;
 5742|   159k|  openEntity->internalEventPtr = NULL;
 5743|   159k|  openEntity->internalEventEndPtr = NULL;
 5744|   159k|  textStart = (const char *)entity->textPtr;
 5745|   159k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5746|       |  /* Set a safe default value in case 'next' does not get set */
 5747|   159k|  next = textStart;
 5748|       |
 5749|   159k|#ifdef XML_DTD
 5750|   159k|  if (entity->is_param) {
  ------------------
  |  Branch (5750:7): [True: 0, False: 159k]
  ------------------
 5751|      0|    int tok
 5752|      0|        = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
  ------------------
  |  |  227|      0|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|      0|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5753|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5754|      0|                      tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
                                    tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5755|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5756|      0|  } else
 5757|   159k|#endif /* XML_DTD */
 5758|   159k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5759|   159k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   159k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5760|   159k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5761|       |
 5762|   159k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5762:7): [True: 158k, False: 764]
  ------------------
 5763|   158k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5763:9): [True: 0, False: 158k]
  |  Branch (5763:28): [True: 0, False: 0]
  ------------------
 5764|      0|      entity->processed = (int)(next - textStart);
 5765|      0|      parser->m_processor = internalEntityProcessor;
 5766|   158k|    } else {
 5767|   158k|#ifdef XML_DTD
 5768|   158k|      entityTrackingOnClose(parser, entity, __LINE__);
 5769|   158k|#endif /* XML_DTD */
 5770|   158k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   158k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5771|   158k|      parser->m_openInternalEntities = openEntity->next;
 5772|       |      /* put openEntity back in list of free instances */
 5773|   158k|      openEntity->next = parser->m_freeInternalEntities;
 5774|   158k|      parser->m_freeInternalEntities = openEntity;
 5775|   158k|    }
 5776|   158k|  }
 5777|   159k|  return result;
 5778|   159k|}
xmlparse.c:entityTrackingOnOpen:
 7828|   790k|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7829|   790k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7830|   790k|  assert(! rootParser->m_parentParser);
 7831|       |
 7832|      0|  rootParser->m_entity_stats.countEverOpened++;
 7833|   790k|  rootParser->m_entity_stats.currentDepth++;
 7834|   790k|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7834:7): [True: 2.31k, False: 788k]
  ------------------
 7835|   790k|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7836|  2.31k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7837|  2.31k|  }
 7838|       |
 7839|   790k|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7840|   790k|}
xmlparse.c:entityTrackingReportStats:
 7805|  1.58M|                          const char *action, int sourceLine) {
 7806|  1.58M|  assert(! rootParser->m_parentParser);
 7807|  1.58M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7807:7): [True: 1.58M, False: 0]
  ------------------
 7808|  1.58M|    return;
 7809|       |
 7810|       |#  if defined(XML_UNICODE)
 7811|       |  const char *const entityName = "[..]";
 7812|       |#  else
 7813|      0|  const char *const entityName = entity->name;
 7814|      0|#  endif
 7815|       |
 7816|      0|  fprintf(
 7817|      0|      stderr,
 7818|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7819|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7820|      0|      rootParser->m_entity_stats.currentDepth,
 7821|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7822|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7823|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7823:7): [True: 0, False: 0]
  ------------------
 7824|      0|      sourceLine);
 7825|      0|}
xmlparse.c:entityTrackingOnClose:
 7843|   790k|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7844|   790k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7845|   790k|  assert(! rootParser->m_parentParser);
 7846|       |
 7847|      0|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7848|   790k|  rootParser->m_entity_stats.currentDepth--;
 7849|   790k|}
xmlparse.c:reportProcessingInstruction:
 6293|  17.1k|                            const char *start, const char *end) {
 6294|  17.1k|  const XML_Char *target;
 6295|  17.1k|  XML_Char *data;
 6296|  17.1k|  const char *tem;
 6297|  17.1k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6297:7): [True: 17.1k, False: 0]
  ------------------
 6298|  17.1k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6298:9): [True: 0, False: 17.1k]
  ------------------
 6299|      0|      reportDefault(parser, enc, start, end);
 6300|  17.1k|    return 1;
 6301|  17.1k|  }
 6302|      0|  start += enc->minBytesPerChar * 2;
 6303|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6304|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6305|      0|  if (! target)
  ------------------
  |  Branch (6305:7): [True: 0, False: 0]
  ------------------
 6306|      0|    return 0;
 6307|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6308|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6309|      0|                         end - enc->minBytesPerChar * 2);
 6310|      0|  if (! data)
  ------------------
  |  Branch (6310:7): [True: 0, False: 0]
  ------------------
 6311|      0|    return 0;
 6312|      0|  normalizeLines(data);
 6313|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6314|      0|  poolClear(&parser->m_tempPool);
 6315|      0|  return 1;
 6316|      0|}
xmlparse.c:reportComment:
 6320|  2.74k|              const char *end) {
 6321|  2.74k|  XML_Char *data;
 6322|  2.74k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6322:7): [True: 2.74k, False: 0]
  ------------------
 6323|  2.74k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6323:9): [True: 0, False: 2.74k]
  ------------------
 6324|      0|      reportDefault(parser, enc, start, end);
 6325|  2.74k|    return 1;
 6326|  2.74k|  }
 6327|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6328|      0|                         start + enc->minBytesPerChar * 4,
 6329|      0|                         end - enc->minBytesPerChar * 3);
 6330|      0|  if (! data)
  ------------------
  |  Branch (6330:7): [True: 0, False: 0]
  ------------------
 6331|      0|    return 0;
 6332|      0|  normalizeLines(data);
 6333|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6334|      0|  poolClear(&parser->m_tempPool);
 6335|      0|  return 1;
 6336|      0|}
xmlparse.c:getDebugLevel:
 8391|  39.4k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8392|  39.4k|  const char *const valueOrNull = getenv(variableName);
 8393|  39.4k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8393:7): [True: 39.4k, False: 0]
  ------------------
 8394|  39.4k|    return defaultDebugLevel;
 8395|  39.4k|  }
 8396|      0|  const char *const value = valueOrNull;
 8397|       |
 8398|      0|  errno = 0;
 8399|      0|  char *afterValue = NULL;
 8400|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8401|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8401:7): [True: 0, False: 0]
  |  Branch (8401:23): [True: 0, False: 0]
  |  Branch (8401:48): [True: 0, False: 0]
  ------------------
 8402|      0|    errno = 0;
 8403|      0|    return defaultDebugLevel;
 8404|      0|  }
 8405|       |
 8406|      0|  return debugLevel;
 8407|      0|}
xmlparse.c:destroyBindings:
 1429|  2.66M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1430|  2.66M|  for (;;) {
 1431|  2.66M|    BINDING *b = bindings;
 1432|  2.66M|    if (! b)
  ------------------
  |  Branch (1432:9): [True: 2.66M, False: 0]
  ------------------
 1433|  2.66M|      break;
 1434|      0|    bindings = b->nextTagBinding;
 1435|      0|    FREE(parser, b->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|    FREE(parser, b);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1437|      0|  }
 1438|  2.66M|}
xmlparse.c:startParsing:
  954|  19.7k|startParsing(XML_Parser parser) {
  955|       |  /* hash functions must be initialized before setContext() is called */
  956|  19.7k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (956:7): [True: 0, False: 19.7k]
  ------------------
  957|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  958|  19.7k|  if (parser->m_ns) {
  ------------------
  |  Branch (958:7): [True: 0, False: 19.7k]
  ------------------
  959|       |    /* implicit context only set for root parser, since child
  960|       |       parsers (i.e. external entity parsers) will inherit it
  961|       |    */
  962|      0|    return setContext(parser, implicitContext);
  963|      0|  }
  964|  19.7k|  return XML_TRUE;
  ------------------
  |  |   55|  19.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  965|  19.7k|}
xmlparse.c:dtdDestroy:
 6789|  19.7k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6790|  19.7k|  HASH_TABLE_ITER iter;
 6791|  19.7k|  hashTableIterInit(&iter, &(p->elementTypes));
 6792|  40.6k|  for (;;) {
 6793|  40.6k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6794|  40.6k|    if (! e)
  ------------------
  |  Branch (6794:9): [True: 19.7k, False: 20.9k]
  ------------------
 6795|  19.7k|      break;
 6796|  20.9k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6796:9): [True: 979, False: 19.9k]
  ------------------
 6797|    979|      ms->free_fcn(e->defaultAtts);
 6798|  20.9k|  }
 6799|  19.7k|  hashTableDestroy(&(p->generalEntities));
 6800|  19.7k|#ifdef XML_DTD
 6801|  19.7k|  hashTableDestroy(&(p->paramEntities));
 6802|  19.7k|#endif /* XML_DTD */
 6803|  19.7k|  hashTableDestroy(&(p->elementTypes));
 6804|  19.7k|  hashTableDestroy(&(p->attributeIds));
 6805|  19.7k|  hashTableDestroy(&(p->prefixes));
 6806|  19.7k|  poolDestroy(&(p->pool));
 6807|  19.7k|  poolDestroy(&(p->entityValuePool));
 6808|  19.7k|  if (isDocEntity) {
  ------------------
  |  Branch (6808:7): [True: 19.7k, False: 0]
  ------------------
 6809|  19.7k|    ms->free_fcn(p->scaffIndex);
 6810|  19.7k|    ms->free_fcn(p->scaffold);
 6811|  19.7k|  }
 6812|  19.7k|  ms->free_fcn(p);
 6813|  19.7k|}
xmlparse.c:hashTableDestroy:
 7142|  98.5k|hashTableDestroy(HASH_TABLE *table) {
 7143|  98.5k|  size_t i;
 7144|  1.22M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7144:15): [True: 1.12M, False: 98.5k]
  ------------------
 7145|  1.12M|    table->mem->free_fcn(table->v[i]);
 7146|  98.5k|  table->mem->free_fcn(table->v);
 7147|  98.5k|}
xmlparse.c:poolClear:
 7185|  2.66M|poolClear(STRING_POOL *pool) {
 7186|  2.66M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7186:7): [True: 2.36M, False: 298k]
  ------------------
 7187|  2.36M|    pool->freeBlocks = pool->blocks;
 7188|   298k|  else {
 7189|   298k|    BLOCK *p = pool->blocks;
 7190|   300k|    while (p) {
  ------------------
  |  Branch (7190:12): [True: 1.52k, False: 298k]
  ------------------
 7191|  1.52k|      BLOCK *tem = p->next;
 7192|  1.52k|      p->next = pool->freeBlocks;
 7193|  1.52k|      pool->freeBlocks = p;
 7194|  1.52k|      p = tem;
 7195|  1.52k|    }
 7196|   298k|  }
 7197|  2.66M|  pool->blocks = NULL;
 7198|  2.66M|  pool->start = NULL;
 7199|  2.66M|  pool->ptr = NULL;
 7200|  2.66M|  pool->end = NULL;
 7201|  2.66M|}
xmlparse.c:poolDestroy:
 7204|  78.8k|poolDestroy(STRING_POOL *pool) {
 7205|  78.8k|  BLOCK *p = pool->blocks;
 7206|  97.5k|  while (p) {
  ------------------
  |  Branch (7206:10): [True: 18.7k, False: 78.8k]
  ------------------
 7207|  18.7k|    BLOCK *tem = p->next;
 7208|  18.7k|    pool->mem->free_fcn(p);
 7209|  18.7k|    p = tem;
 7210|  18.7k|  }
 7211|  78.8k|  p = pool->freeBlocks;
 7212|  81.3k|  while (p) {
  ------------------
  |  Branch (7212:10): [True: 2.55k, False: 78.8k]
  ------------------
 7213|  2.55k|    BLOCK *tem = p->next;
 7214|  2.55k|    pool->mem->free_fcn(p);
 7215|  2.55k|    p = tem;
 7216|  2.55k|  }
 7217|  78.8k|}
xmlparse.c:poolCopyString:
 7237|  15.1k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7238|  3.72M|  do {
 7239|  3.72M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  603|  3.72M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 7.90k, False: 3.71M]
  |  |  |  Branch (603:35): [True: 0, False: 7.90k]
  |  |  ------------------
  |  |  604|  3.72M|       ? 0                                                                     \
  |  |  605|  3.72M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7239:9): [True: 0, False: 3.72M]
  ------------------
 7240|      0|      return NULL;
 7241|  3.72M|  } while (*s++);
  ------------------
  |  Branch (7241:12): [True: 3.70M, False: 15.1k]
  ------------------
 7242|  15.1k|  s = pool->start;
 7243|  15.1k|  poolFinish(pool);
  ------------------
  |  |  601|  15.1k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7244|  15.1k|  return s;
 7245|  15.1k|}
xmlparse.c:copyString:
 7637|  19.7k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7638|  19.7k|  size_t charsRequired = 0;
 7639|  19.7k|  XML_Char *result;
 7640|       |
 7641|       |  /* First determine how long the string is */
 7642|   177k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7642:10): [True: 157k, False: 19.7k]
  ------------------
 7643|   157k|    charsRequired++;
 7644|   157k|  }
 7645|       |  /* Include the terminator */
 7646|  19.7k|  charsRequired++;
 7647|       |
 7648|       |  /* Now allocate space for the copy */
 7649|  19.7k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7650|  19.7k|  if (result == NULL)
  ------------------
  |  Branch (7650:7): [True: 0, False: 19.7k]
  ------------------
 7651|      0|    return NULL;
 7652|       |  /* Copy the original into place */
 7653|  19.7k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7654|  19.7k|  return result;
 7655|  19.7k|}

XmlPrologStateInit:
 1237|  19.7k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  19.7k|  state->handler = prolog0;
 1239|  19.7k|#ifdef XML_DTD
 1240|  19.7k|  state->documentEntity = 1;
 1241|  19.7k|  state->includeLevel = 0;
 1242|  19.7k|  state->inEntityValue = 0;
 1243|  19.7k|#endif /* XML_DTD */
 1244|  19.7k|}
xmlrole.c:prolog0:
  142|  23.5k|        const ENCODING *enc) {
  143|  23.5k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 292, False: 23.2k]
  ------------------
  144|    561|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    561|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 561, False: 23.0k]
  ------------------
  145|    561|    state->handler = prolog1;
  146|    561|    return XML_ROLE_NONE;
  147|    303|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    303|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 303, False: 23.2k]
  ------------------
  148|    303|    state->handler = prolog1;
  149|    303|    return XML_ROLE_XML_DECL;
  150|    348|  case XML_TOK_PI:
  ------------------
  |  |   76|    348|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 348, False: 23.2k]
  ------------------
  151|    348|    state->handler = prolog1;
  152|    348|    return XML_ROLE_PI;
  153|     46|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     46|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 46, False: 23.5k]
  ------------------
  154|     46|    state->handler = prolog1;
  155|     46|    return XML_ROLE_COMMENT;
  156|  7.17k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  7.17k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 7.17k, False: 16.4k]
  ------------------
  157|  7.17k|    return XML_ROLE_NONE;
  158|  5.71k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.71k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.71k, False: 17.8k]
  ------------------
  159|  5.71k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.71k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 98, False: 5.62k]
  ------------------
  160|  5.71k|                              KW_DOCTYPE))
  161|     98|      break;
  162|  5.62k|    state->handler = doctype0;
  163|  5.62k|    return XML_ROLE_DOCTYPE_NONE;
  164|  9.13k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  9.13k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 9.13k, False: 14.4k]
  ------------------
  165|  9.13k|    state->handler = error;
  166|  9.13k|    return XML_ROLE_INSTANCE_START;
  167|  23.5k|  }
  168|    390|  return common(state, tok);
  169|  23.5k|}
xmlrole.c:prolog1:
  173|  5.41k|        const ENCODING *enc) {
  174|  5.41k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 7, False: 5.40k]
  ------------------
  175|    848|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    848|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 848, False: 4.56k]
  ------------------
  176|    848|    return XML_ROLE_NONE;
  177|  3.52k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.52k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 3.52k, False: 1.88k]
  ------------------
  178|  3.52k|    return XML_ROLE_PI;
  179|    651|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    651|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 651, False: 4.76k]
  ------------------
  180|    651|    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.41k]
  ------------------
  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|    335|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    335|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 335, False: 5.08k]
  ------------------
  191|    335|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    335|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 5, False: 330]
  ------------------
  192|    335|                              KW_DOCTYPE))
  193|      5|      break;
  194|    330|    state->handler = doctype0;
  195|    330|    return XML_ROLE_DOCTYPE_NONE;
  196|     46|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     46|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 46, False: 5.36k]
  ------------------
  197|     46|    state->handler = error;
  198|     46|    return XML_ROLE_INSTANCE_START;
  199|  5.41k|  }
  200|     12|  return common(state, tok);
  201|  5.41k|}
xmlrole.c:doctype0:
  225|  11.8k|         const ENCODING *enc) {
  226|  11.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.8k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  11.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.8k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  11.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.8k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  11.8k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 12, False: 11.8k]
  ------------------
  230|  5.94k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.94k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 5.94k, False: 5.93k]
  ------------------
  231|  5.94k|    return XML_ROLE_DOCTYPE_NONE;
  232|  5.92k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.92k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 5.92k, False: 5.96k]
  ------------------
  233|  5.92k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.92k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 11.8k]
  ------------------
  234|  5.92k|    state->handler = doctype1;
  235|  5.92k|    return XML_ROLE_DOCTYPE_NAME;
  236|  11.8k|  }
  237|     12|  return common(state, tok);
  238|  11.8k|}
xmlrole.c:doctype1:
  242|  6.97k|         const ENCODING *enc) {
  243|  6.97k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 5, False: 6.97k]
  ------------------
  244|  1.06k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.06k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.06k, False: 5.90k]
  ------------------
  245|  1.06k|    return XML_ROLE_DOCTYPE_NONE;
  246|  5.08k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  5.08k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 5.08k, False: 1.89k]
  ------------------
  247|  5.08k|    state->handler = internalSubset;
  248|  5.08k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     46|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     46|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 46, False: 6.92k]
  ------------------
  250|     46|    state->handler = prolog2;
  251|     46|    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.20k]
  ------------------
  253|    775|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    775|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 17, False: 758]
  |  |  ------------------
  ------------------
  254|     17|      state->handler = doctype3;
  255|     17|      return XML_ROLE_DOCTYPE_NONE;
  256|     17|    }
  257|    758|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    758|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 726, False: 32]
  |  |  ------------------
  ------------------
  258|    726|      state->handler = doctype2;
  259|    726|      return XML_ROLE_DOCTYPE_NONE;
  260|    726|    }
  261|     32|    break;
  262|  6.97k|  }
  263|     37|  return common(state, tok);
  264|  6.97k|}
xmlrole.c:internalSubset:
  335|  41.9k|               const ENCODING *enc) {
  336|  41.9k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 95, False: 41.8k]
  ------------------
  337|  3.03k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.03k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 3.03k, False: 38.9k]
  ------------------
  338|  3.03k|    return XML_ROLE_NONE;
  339|  29.8k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  29.8k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 29.8k, False: 12.0k]
  ------------------
  340|  29.8k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  29.8k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 12.7k, False: 17.1k]
  |  |  ------------------
  ------------------
  341|  29.8k|                            KW_ENTITY)) {
  342|  12.7k|      state->handler = entity0;
  343|  12.7k|      return XML_ROLE_ENTITY_NONE;
  344|  12.7k|    }
  345|  17.1k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  17.1k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 8.61k, False: 8.53k]
  |  |  ------------------
  ------------------
  346|  17.1k|                            KW_ATTLIST)) {
  347|  8.61k|      state->handler = attlist0;
  348|  8.61k|      return XML_ROLE_ATTLIST_NONE;
  349|  8.61k|    }
  350|  8.53k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  8.53k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 6.78k, False: 1.75k]
  |  |  ------------------
  ------------------
  351|  8.53k|                            KW_ELEMENT)) {
  352|  6.78k|      state->handler = element0;
  353|  6.78k|      return XML_ROLE_ELEMENT_NONE;
  354|  6.78k|    }
  355|  1.75k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.75k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.72k, False: 28]
  |  |  ------------------
  ------------------
  356|  1.75k|                            KW_NOTATION)) {
  357|  1.72k|      state->handler = notation0;
  358|  1.72k|      return XML_ROLE_NOTATION_NONE;
  359|  1.72k|    }
  360|     28|    break;
  361|  2.51k|  case XML_TOK_PI:
  ------------------
  |  |   76|  2.51k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 2.51k, False: 39.4k]
  ------------------
  362|  2.51k|    return XML_ROLE_PI;
  363|    354|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    354|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 354, False: 41.5k]
  ------------------
  364|    354|    return XML_ROLE_COMMENT;
  365|  3.85k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  3.85k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 3.85k, False: 38.0k]
  ------------------
  366|  3.85k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.23k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.23k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.23k, False: 39.7k]
  ------------------
  368|  2.23k|    state->handler = doctype5;
  369|  2.23k|    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: 41.9k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  41.9k|  }
  373|    123|  return common(state, tok);
  374|  41.9k|}
xmlrole.c:entity0:
  417|  25.3k|        const ENCODING *enc) {
  418|  25.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  25.3k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  25.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  25.3k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  25.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  25.3k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  25.3k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 7, False: 25.3k]
  ------------------
  422|  12.7k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  12.7k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 12.7k, False: 12.6k]
  ------------------
  423|  12.7k|    return XML_ROLE_ENTITY_NONE;
  424|  5.17k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  5.17k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 5.17k, False: 20.2k]
  ------------------
  425|  5.17k|    state->handler = entity1;
  426|  5.17k|    return XML_ROLE_ENTITY_NONE;
  427|  7.51k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  7.51k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 7.51k, False: 17.8k]
  ------------------
  428|  7.51k|    state->handler = entity2;
  429|  7.51k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  25.3k|  }
  431|      7|  return common(state, tok);
  432|  25.3k|}
xmlrole.c:entity1:
  436|  10.3k|        const ENCODING *enc) {
  437|  10.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  10.3k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  10.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  10.3k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  10.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.3k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  10.3k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 40, False: 10.2k]
  ------------------
  441|  5.16k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.16k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 5.16k, False: 5.15k]
  ------------------
  442|  5.16k|    return XML_ROLE_ENTITY_NONE;
  443|  5.11k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.11k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 5.11k, False: 5.20k]
  ------------------
  444|  5.11k|    state->handler = entity7;
  445|  5.11k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  10.3k|  }
  447|     40|  return common(state, tok);
  448|  10.3k|}
xmlrole.c:entity7:
  544|  10.1k|        const ENCODING *enc) {
  545|  10.1k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 12, False: 10.1k]
  ------------------
  546|  5.10k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.10k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 5.10k, False: 5.08k]
  ------------------
  547|  5.10k|    return XML_ROLE_ENTITY_NONE;
  548|  1.97k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.97k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.97k, False: 8.21k]
  ------------------
  549|  1.97k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.97k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 600, False: 1.37k]
  |  |  ------------------
  ------------------
  550|    600|      state->handler = entity9;
  551|    600|      return XML_ROLE_ENTITY_NONE;
  552|    600|    }
  553|  1.37k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.37k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.37k, False: 3]
  |  |  ------------------
  ------------------
  554|  1.37k|      state->handler = entity8;
  555|  1.37k|      return XML_ROLE_ENTITY_NONE;
  556|  1.37k|    }
  557|      3|    break;
  558|  3.09k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  3.09k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 3.09k, False: 7.08k]
  ------------------
  559|  3.09k|    state->handler = declClose;
  560|  3.09k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  3.09k|    return XML_ROLE_ENTITY_VALUE;
  562|  10.1k|  }
  563|     15|  return common(state, tok);
  564|  10.1k|}
xmlrole.c:entity9:
  584|  3.92k|        const ENCODING *enc) {
  585|  3.92k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.92k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  3.92k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.92k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  3.92k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.92k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  3.92k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 3, False: 3.91k]
  ------------------
  589|  1.96k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.96k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.96k, False: 1.95k]
  ------------------
  590|  1.96k|    return XML_ROLE_ENTITY_NONE;
  591|  1.95k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.95k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.95k, False: 1.97k]
  ------------------
  592|  1.95k|    state->handler = entity10;
  593|  1.95k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  3.92k|  }
  595|      3|  return common(state, tok);
  596|  3.92k|}
xmlrole.c:entity10:
  600|  2.95k|         const ENCODING *enc) {
  601|  2.95k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.95k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  2.95k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.95k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  2.95k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.95k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  2.95k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 3, False: 2.94k]
  ------------------
  605|  1.00k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.00k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 1.00k, False: 1.94k]
  ------------------
  606|  1.00k|    return XML_ROLE_ENTITY_NONE;
  607|  1.94k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.94k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.94k, False: 1.01k]
  ------------------
  608|  1.94k|    setTopLevel(state);
  ------------------
  |  |  116|  1.94k|    ((state)->handler                                                          \
  |  |  117|  1.94k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.94k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.94k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  2.95k|  }
  611|      3|  return common(state, tok);
  612|  2.95k|}
xmlrole.c:entity8:
  568|  2.74k|        const ENCODING *enc) {
  569|  2.74k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.74k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  2.74k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.74k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  2.74k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.74k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  2.74k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 2.74k]
  ------------------
  573|  1.37k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.37k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 1.37k, False: 1.37k]
  ------------------
  574|  1.37k|    return XML_ROLE_ENTITY_NONE;
  575|  1.36k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.36k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 1.36k, False: 1.37k]
  ------------------
  576|  1.36k|    state->handler = entity9;
  577|  1.36k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  2.74k|  }
  579|      2|  return common(state, tok);
  580|  2.74k|}
xmlrole.c:declClose:
 1178|  18.1k|          const ENCODING *enc) {
 1179|  18.1k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  18.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  18.1k|  UNUSED_P(end);
  ------------------
  |  |  135|  18.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  18.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  18.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  18.1k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 131, False: 18.0k]
  ------------------
 1183|  2.66k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.66k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 2.66k, False: 15.5k]
  ------------------
 1184|  2.66k|    return state->role_none;
 1185|  15.3k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  15.3k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 15.3k, False: 2.79k]
  ------------------
 1186|  15.3k|    setTopLevel(state);
  ------------------
  |  |  116|  15.3k|    ((state)->handler                                                          \
  |  |  117|  15.3k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 15.3k, False: 0]
  |  |  ------------------
  ------------------
 1187|  15.3k|    return state->role_none;
 1188|  18.1k|  }
 1189|    131|  return common(state, tok);
 1190|  18.1k|}
xmlrole.c:entity2:
  452|  14.9k|        const ENCODING *enc) {
  453|  14.9k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 9, False: 14.9k]
  ------------------
  454|  7.50k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  7.50k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 7.50k, False: 7.47k]
  ------------------
  455|  7.50k|    return XML_ROLE_ENTITY_NONE;
  456|  2.15k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.15k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 2.15k, False: 12.8k]
  ------------------
  457|  2.15k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  2.15k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.10k, False: 1.04k]
  |  |  ------------------
  ------------------
  458|  1.10k|      state->handler = entity4;
  459|  1.10k|      return XML_ROLE_ENTITY_NONE;
  460|  1.10k|    }
  461|  1.04k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.04k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.04k, False: 6]
  |  |  ------------------
  ------------------
  462|  1.04k|      state->handler = entity3;
  463|  1.04k|      return XML_ROLE_ENTITY_NONE;
  464|  1.04k|    }
  465|      6|    break;
  466|  5.30k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  5.30k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 5.30k, False: 9.67k]
  ------------------
  467|  5.30k|    state->handler = declClose;
  468|  5.30k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  5.30k|    return XML_ROLE_ENTITY_VALUE;
  470|  14.9k|  }
  471|     15|  return common(state, tok);
  472|  14.9k|}
xmlrole.c:entity4:
  492|  4.24k|        const ENCODING *enc) {
  493|  4.24k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.24k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  4.24k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.24k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  4.24k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.24k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  4.24k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 9, False: 4.23k]
  ------------------
  497|  2.12k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.12k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 2.12k, False: 2.11k]
  ------------------
  498|  2.12k|    return XML_ROLE_ENTITY_NONE;
  499|  2.10k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.10k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 2.10k, False: 2.13k]
  ------------------
  500|  2.10k|    state->handler = entity5;
  501|  2.10k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  4.24k|  }
  503|      9|  return common(state, tok);
  504|  4.24k|}
xmlrole.c:entity5:
  508|  3.18k|        const ENCODING *enc) {
  509|  3.18k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 1, False: 3.18k]
  ------------------
  510|  1.08k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.08k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.08k, False: 2.10k]
  ------------------
  511|  1.08k|    return XML_ROLE_ENTITY_NONE;
  512|  1.49k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.49k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 1.49k, False: 1.68k]
  ------------------
  513|  1.49k|    setTopLevel(state);
  ------------------
  |  |  116|  1.49k|    ((state)->handler                                                          \
  |  |  117|  1.49k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.49k, False: 0]
  |  |  ------------------
  ------------------
  514|  1.49k|    return XML_ROLE_ENTITY_COMPLETE;
  515|    602|  case XML_TOK_NAME:
  ------------------
  |  |   85|    602|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 602, False: 2.58k]
  ------------------
  516|    602|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    602|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 598, False: 4]
  |  |  ------------------
  ------------------
  517|    598|      state->handler = entity6;
  518|    598|      return XML_ROLE_ENTITY_NONE;
  519|    598|    }
  520|      4|    break;
  521|  3.18k|  }
  522|      5|  return common(state, tok);
  523|  3.18k|}
xmlrole.c:entity6:
  527|  1.19k|        const ENCODING *enc) {
  528|  1.19k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.19k|#  define UNUSED_P(p) (void)p
  ------------------
  529|  1.19k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.19k|#  define UNUSED_P(p) (void)p
  ------------------
  530|  1.19k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.19k|#  define UNUSED_P(p) (void)p
  ------------------
  531|  1.19k|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 3, False: 1.18k]
  ------------------
  532|    597|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    597|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 597, False: 595]
  ------------------
  533|    597|    return XML_ROLE_ENTITY_NONE;
  534|    592|  case XML_TOK_NAME:
  ------------------
  |  |   85|    592|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 592, False: 600]
  ------------------
  535|    592|    state->handler = declClose;
  536|    592|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    592|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.19k|  }
  539|      3|  return common(state, tok);
  540|  1.19k|}
xmlrole.c:entity3:
  476|  2.07k|        const ENCODING *enc) {
  477|  2.07k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.07k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  2.07k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.07k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  2.07k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.07k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  2.07k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 2, False: 2.07k]
  ------------------
  481|  1.03k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.03k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 1.03k, False: 1.03k]
  ------------------
  482|  1.03k|    return XML_ROLE_ENTITY_NONE;
  483|  1.03k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.03k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 1.03k, False: 1.04k]
  ------------------
  484|  1.03k|    state->handler = entity4;
  485|  1.03k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  2.07k|  }
  487|      2|  return common(state, tok);
  488|  2.07k|}
xmlrole.c:attlist0:
  705|  17.2k|         const ENCODING *enc) {
  706|  17.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  17.2k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  17.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  17.2k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  17.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  17.2k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  17.2k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 13, False: 17.1k]
  ------------------
  710|  8.60k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.60k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 8.60k, False: 8.59k]
  ------------------
  711|  8.60k|    return XML_ROLE_ATTLIST_NONE;
  712|  8.57k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  8.57k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 8.57k, False: 8.62k]
  ------------------
  713|  8.57k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  8.57k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 17.2k]
  ------------------
  714|  8.57k|    state->handler = attlist1;
  715|  8.57k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  17.2k|  }
  717|     13|  return common(state, tok);
  718|  17.2k|}
xmlrole.c:attlist1:
  722|  54.2k|         const ENCODING *enc) {
  723|  54.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  54.2k|#  define UNUSED_P(p) (void)p
  ------------------
  724|  54.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  54.2k|#  define UNUSED_P(p) (void)p
  ------------------
  725|  54.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  54.2k|#  define UNUSED_P(p) (void)p
  ------------------
  726|  54.2k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 48, False: 54.1k]
  ------------------
  727|  23.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  23.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 23.2k, False: 30.9k]
  ------------------
  728|  23.2k|    return XML_ROLE_ATTLIST_NONE;
  729|  7.79k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  7.79k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 7.79k, False: 46.4k]
  ------------------
  730|  7.79k|    setTopLevel(state);
  ------------------
  |  |  116|  7.79k|    ((state)->handler                                                          \
  |  |  117|  7.79k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 7.79k, False: 0]
  |  |  ------------------
  ------------------
  731|  7.79k|    return XML_ROLE_ATTLIST_NONE;
  732|  23.0k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  23.0k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 23.0k, False: 31.1k]
  ------------------
  733|  23.0k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  23.0k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 54.2k]
  ------------------
  734|  23.0k|    state->handler = attlist2;
  735|  23.0k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|  54.2k|  }
  737|     48|  return common(state, tok);
  738|  54.2k|}
xmlrole.c:attlist2:
  742|  46.0k|         const ENCODING *enc) {
  743|  46.0k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 18, False: 46.0k]
  ------------------
  744|  23.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  23.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 23.0k, False: 23.0k]
  ------------------
  745|  23.0k|    return XML_ROLE_ATTLIST_NONE;
  746|  19.2k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  19.2k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 19.2k, False: 26.8k]
  ------------------
  747|  19.2k|    static const char *const types[] = {
  748|  19.2k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  19.2k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  19.2k|    };
  751|  19.2k|    int i;
  752|  74.7k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 73.1k, False: 1.58k]
  ------------------
  753|  73.1k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  73.1k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 17.6k, False: 55.5k]
  |  |  ------------------
  ------------------
  754|  17.6k|        state->handler = attlist8;
  755|  17.6k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  17.6k|      }
  757|  19.2k|  }
  758|  1.58k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|  1.58k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.53k, False: 47]
  |  |  ------------------
  ------------------
  759|  1.53k|      state->handler = attlist5;
  760|  1.53k|      return XML_ROLE_ATTLIST_NONE;
  761|  1.53k|    }
  762|     47|    break;
  763|  3.77k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  3.77k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 3.77k, False: 42.3k]
  ------------------
  764|  3.77k|    state->handler = attlist3;
  765|  3.77k|    return XML_ROLE_ATTLIST_NONE;
  766|  46.0k|  }
  767|     65|  return common(state, tok);
  768|  46.0k|}
xmlrole.c:attlist8:
  861|  45.3k|         const ENCODING *enc) {
  862|  45.3k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 14, False: 45.3k]
  ------------------
  863|  22.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  22.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 22.6k, False: 22.6k]
  ------------------
  864|  22.6k|    return XML_ROLE_ATTLIST_NONE;
  865|  9.69k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  9.69k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 9.69k, False: 35.6k]
  ------------------
  866|  9.69k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  9.69k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 6.52k, False: 3.17k]
  |  |  ------------------
  ------------------
  867|  9.69k|                            KW_IMPLIED)) {
  868|  6.52k|      state->handler = attlist1;
  869|  6.52k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  6.52k|    }
  871|  3.17k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  3.17k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.97k, False: 1.19k]
  |  |  ------------------
  ------------------
  872|  3.17k|                            KW_REQUIRED)) {
  873|  1.97k|      state->handler = attlist1;
  874|  1.97k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  1.97k|    }
  876|  1.19k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.19k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.18k, False: 9]
  |  |  ------------------
  ------------------
  877|  1.19k|                            KW_FIXED)) {
  878|  1.18k|      state->handler = attlist9;
  879|  1.18k|      return XML_ROLE_ATTLIST_NONE;
  880|  1.18k|    }
  881|      9|    break;
  882|  12.9k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  12.9k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 12.9k, False: 32.4k]
  ------------------
  883|  12.9k|    state->handler = attlist1;
  884|  12.9k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  45.3k|  }
  886|     23|  return common(state, tok);
  887|  45.3k|}
xmlrole.c:attlist9:
  891|  2.35k|         const ENCODING *enc) {
  892|  2.35k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  2.35k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  2.35k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  2.35k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 18, False: 2.33k]
  ------------------
  896|  1.18k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.18k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 1.18k, False: 1.16k]
  ------------------
  897|  1.18k|    return XML_ROLE_ATTLIST_NONE;
  898|  1.15k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.15k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 1.15k, False: 1.20k]
  ------------------
  899|  1.15k|    state->handler = attlist1;
  900|  1.15k|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  2.35k|  }
  902|     18|  return common(state, tok);
  903|  2.35k|}
xmlrole.c:attlist5:
  809|  3.06k|         const ENCODING *enc) {
  810|  3.06k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.06k|#  define UNUSED_P(p) (void)p
  ------------------
  811|  3.06k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.06k|#  define UNUSED_P(p) (void)p
  ------------------
  812|  3.06k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.06k|#  define UNUSED_P(p) (void)p
  ------------------
  813|  3.06k|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 1, False: 3.06k]
  ------------------
  814|  1.53k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.53k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 1.53k, False: 1.53k]
  ------------------
  815|  1.53k|    return XML_ROLE_ATTLIST_NONE;
  816|  1.53k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  1.53k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 1.53k, False: 1.53k]
  ------------------
  817|  1.53k|    state->handler = attlist6;
  818|  1.53k|    return XML_ROLE_ATTLIST_NONE;
  819|  3.06k|  }
  820|      1|  return common(state, tok);
  821|  3.06k|}
xmlrole.c:attlist6:
  825|  2.40k|         const ENCODING *enc) {
  826|  2.40k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.40k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  2.40k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.40k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  2.40k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.40k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  2.40k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 3, False: 2.40k]
  ------------------
  830|    288|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    288|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 288, False: 2.11k]
  ------------------
  831|    288|    return XML_ROLE_ATTLIST_NONE;
  832|  2.11k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.11k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 2.11k, False: 291]
  ------------------
  833|  2.11k|    state->handler = attlist7;
  834|  2.11k|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  2.40k|  }
  836|      3|  return common(state, tok);
  837|  2.40k|}
xmlrole.c:attlist7:
  841|  2.48k|         const ENCODING *enc) {
  842|  2.48k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.48k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  2.48k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.48k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  2.48k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.48k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  2.48k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 1, False: 2.48k]
  ------------------
  846|    381|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    381|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 381, False: 2.10k]
  ------------------
  847|    381|    return XML_ROLE_ATTLIST_NONE;
  848|  1.49k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  1.49k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 1.49k, False: 995]
  ------------------
  849|  1.49k|    state->handler = attlist8;
  850|  1.49k|    return XML_ROLE_ATTLIST_NONE;
  851|    613|  case XML_TOK_OR:
  ------------------
  |  |   88|    613|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 613, False: 1.87k]
  ------------------
  852|    613|    state->handler = attlist6;
  853|    613|    return XML_ROLE_ATTLIST_NONE;
  854|  2.48k|  }
  855|      1|  return common(state, tok);
  856|  2.48k|}
xmlrole.c:attlist3:
  772|  10.8k|         const ENCODING *enc) {
  773|  10.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  10.8k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  10.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  10.8k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  10.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.8k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  10.8k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 8, False: 10.8k]
  ------------------
  777|    757|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    757|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 757, False: 10.1k]
  ------------------
  778|    757|    return XML_ROLE_ATTLIST_NONE;
  779|  4.58k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  4.58k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 4.58k, False: 6.29k]
  ------------------
  780|  10.1k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.1k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 5.53k, False: 5.35k]
  ------------------
  781|  10.1k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  10.1k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 10.8k]
  ------------------
  782|  10.1k|    state->handler = attlist4;
  783|  10.1k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  10.8k|  }
  785|      8|  return common(state, tok);
  786|  10.8k|}
xmlrole.c:attlist4:
  790|  11.5k|         const ENCODING *enc) {
  791|  11.5k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.5k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  11.5k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.5k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  11.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.5k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  11.5k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 12, False: 11.4k]
  ------------------
  795|  1.41k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.41k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 1.41k, False: 10.0k]
  ------------------
  796|  1.41k|    return XML_ROLE_ATTLIST_NONE;
  797|  3.58k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  3.58k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 3.58k, False: 7.91k]
  ------------------
  798|  3.58k|    state->handler = attlist8;
  799|  3.58k|    return XML_ROLE_ATTLIST_NONE;
  800|  6.49k|  case XML_TOK_OR:
  ------------------
  |  |   88|  6.49k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 6.49k, False: 5.01k]
  ------------------
  801|  6.49k|    state->handler = attlist3;
  802|  6.49k|    return XML_ROLE_ATTLIST_NONE;
  803|  11.5k|  }
  804|     12|  return common(state, tok);
  805|  11.5k|}
xmlrole.c:element0:
  907|  13.5k|         const ENCODING *enc) {
  908|  13.5k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  13.5k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  13.5k|  UNUSED_P(end);
  ------------------
  |  |  135|  13.5k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  13.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  13.5k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  13.5k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 6, False: 13.5k]
  ------------------
  912|  6.78k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.78k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 6.78k, False: 6.77k]
  ------------------
  913|  6.78k|    return XML_ROLE_ELEMENT_NONE;
  914|  6.77k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  6.77k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 6.77k, False: 6.78k]
  ------------------
  915|  6.77k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  6.77k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 13.5k]
  ------------------
  916|  6.77k|    state->handler = element1;
  917|  6.77k|    return XML_ROLE_ELEMENT_NAME;
  918|  13.5k|  }
  919|      6|  return common(state, tok);
  920|  13.5k|}
xmlrole.c:element1:
  924|  13.5k|         const ENCODING *enc) {
  925|  13.5k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 2, False: 13.5k]
  ------------------
  926|  6.77k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.77k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 6.77k, False: 6.76k]
  ------------------
  927|  6.77k|    return XML_ROLE_ELEMENT_NONE;
  928|    217|  case XML_TOK_NAME:
  ------------------
  |  |   85|    217|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 217, False: 13.3k]
  ------------------
  929|    217|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|    217|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 194, False: 23]
  |  |  ------------------
  ------------------
  930|    194|      state->handler = declClose;
  931|    194|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|    194|      return XML_ROLE_CONTENT_EMPTY;
  933|    194|    }
  934|     23|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|     23|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 19, False: 4]
  |  |  ------------------
  ------------------
  935|     19|      state->handler = declClose;
  936|     19|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|     19|      return XML_ROLE_CONTENT_ANY;
  938|     19|    }
  939|      4|    break;
  940|  6.54k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  6.54k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 6.54k, False: 6.99k]
  ------------------
  941|  6.54k|    state->handler = element2;
  942|  6.54k|    state->level = 1;
  943|  6.54k|    return XML_ROLE_GROUP_OPEN;
  944|  13.5k|  }
  945|      6|  return common(state, tok);
  946|  13.5k|}
xmlrole.c:element2:
  950|  6.88k|         const ENCODING *enc) {
  951|  6.88k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 2, False: 6.88k]
  ------------------
  952|    351|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    351|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 351, False: 6.53k]
  ------------------
  953|    351|    return XML_ROLE_ELEMENT_NONE;
  954|  4.66k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  4.66k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 4.66k, False: 2.22k]
  ------------------
  955|  4.66k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  4.66k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 4.65k, False: 6]
  |  |  ------------------
  ------------------
  956|  4.66k|                            KW_PCDATA)) {
  957|  4.65k|      state->handler = element3;
  958|  4.65k|      return XML_ROLE_CONTENT_PCDATA;
  959|  4.65k|    }
  960|      6|    break;
  961|    344|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    344|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 344, False: 6.54k]
  ------------------
  962|    344|    state->level = 2;
  963|    344|    state->handler = element6;
  964|    344|    return XML_ROLE_GROUP_OPEN;
  965|    650|  case XML_TOK_NAME:
  ------------------
  |  |   85|    650|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 650, False: 6.23k]
  ------------------
  966|    650|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|    650|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 6.88k]
  ------------------
  967|    650|    state->handler = element7;
  968|    650|    return XML_ROLE_CONTENT_ELEMENT;
  969|    212|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    212|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 212, False: 6.67k]
  ------------------
  970|    212|    state->handler = element7;
  971|    212|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    433|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    433|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 433, False: 6.45k]
  ------------------
  973|    433|    state->handler = element7;
  974|    433|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    235|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    235|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 235, False: 6.65k]
  ------------------
  976|    235|    state->handler = element7;
  977|    235|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  6.88k|  }
  979|      8|  return common(state, tok);
  980|  6.88k|}
xmlrole.c:element3:
  984|  8.69k|         const ENCODING *enc) {
  985|  8.69k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  8.69k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  8.69k|  UNUSED_P(end);
  ------------------
  |  |  135|  8.69k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  8.69k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.69k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  8.69k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 11, False: 8.68k]
  ------------------
  989|  4.04k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.04k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 4.04k, False: 4.64k]
  ------------------
  990|  4.04k|    return XML_ROLE_ELEMENT_NONE;
  991|    415|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    415|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 415, False: 8.27k]
  ------------------
  992|    415|    state->handler = declClose;
  993|    415|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|    415|    return XML_ROLE_GROUP_CLOSE;
  995|  3.97k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  3.97k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 3.97k, False: 4.72k]
  ------------------
  996|  3.97k|    state->handler = declClose;
  997|  3.97k|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|  3.97k|    return XML_ROLE_GROUP_CLOSE_REP;
  999|    249|  case XML_TOK_OR:
  ------------------
  |  |   88|    249|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 249, False: 8.44k]
  ------------------
 1000|    249|    state->handler = element4;
 1001|    249|    return XML_ROLE_ELEMENT_NONE;
 1002|  8.69k|  }
 1003|     11|  return common(state, tok);
 1004|  8.69k|}
xmlrole.c:element4:
 1008|  1.32k|         const ENCODING *enc) {
 1009|  1.32k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  1.32k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  1.32k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  1.32k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 12, False: 1.31k]
  ------------------
 1013|    264|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    264|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 264, False: 1.06k]
  ------------------
 1014|    264|    return XML_ROLE_ELEMENT_NONE;
 1015|  1.05k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.05k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 1.05k, False: 276]
  ------------------
 1016|  1.05k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.05k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 1.32k]
  ------------------
 1017|  1.05k|    state->handler = element5;
 1018|  1.05k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  1.32k|  }
 1020|     12|  return common(state, tok);
 1021|  1.32k|}
xmlrole.c:element5:
 1025|  1.32k|         const ENCODING *enc) {
 1026|  1.32k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  1.32k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  1.32k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  1.32k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 2, False: 1.32k]
  ------------------
 1030|    284|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    284|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 284, False: 1.04k]
  ------------------
 1031|    284|    return XML_ROLE_ELEMENT_NONE;
 1032|    198|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    198|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 198, False: 1.12k]
  ------------------
 1033|    198|    state->handler = declClose;
 1034|    198|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|    198|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|    841|  case XML_TOK_OR:
  ------------------
  |  |   88|    841|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 841, False: 484]
  ------------------
 1037|    841|    state->handler = element4;
 1038|    841|    return XML_ROLE_ELEMENT_NONE;
 1039|  1.32k|  }
 1040|      2|  return common(state, tok);
 1041|  1.32k|}
xmlrole.c:element6:
 1045|  3.04M|         const ENCODING *enc) {
 1046|  3.04M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.04M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  3.04M|  UNUSED_P(end);
  ------------------
  |  |  135|  3.04M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  3.04M|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.04M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  3.04M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 41, False: 3.04M]
  ------------------
 1050|  4.04k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.04k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 4.04k, False: 3.03M]
  ------------------
 1051|  4.04k|    return XML_ROLE_ELEMENT_NONE;
 1052|  3.01M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  3.01M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 3.01M, False: 24.2k]
  ------------------
 1053|  3.01M|    state->level += 1;
 1054|  3.01M|    return XML_ROLE_GROUP_OPEN;
 1055|  16.0k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  16.0k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 16.0k, False: 3.02M]
  ------------------
 1056|  16.0k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  16.0k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 3.04M]
  ------------------
 1057|  16.0k|    state->handler = element7;
 1058|  16.0k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|  1.12k|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|  1.12k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 1.12k, False: 3.04M]
  ------------------
 1060|  1.12k|    state->handler = element7;
 1061|  1.12k|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|    508|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    508|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 508, False: 3.04M]
  ------------------
 1063|    508|    state->handler = element7;
 1064|    508|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|  2.54k|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|  2.54k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 2.54k, False: 3.04M]
  ------------------
 1066|  2.54k|    state->handler = element7;
 1067|  2.54k|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  3.04M|  }
 1069|     41|  return common(state, tok);
 1070|  3.04M|}
xmlrole.c:element7:
 1074|  48.8k|         const ENCODING *enc) {
 1075|  48.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  48.8k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|  48.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  48.8k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|  48.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  48.8k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|  48.8k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 60, False: 48.7k]
  ------------------
 1079|  3.78k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.78k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 3.78k, False: 45.0k]
  ------------------
 1080|  3.78k|    return XML_ROLE_ELEMENT_NONE;
 1081|  17.4k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  17.4k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 17.4k, False: 31.3k]
  ------------------
 1082|  17.4k|    state->level -= 1;
 1083|  17.4k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 885, False: 16.5k]
  ------------------
 1084|    885|      state->handler = declClose;
 1085|    885|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|    885|    }
 1087|  17.4k|    return XML_ROLE_GROUP_CLOSE;
 1088|  3.30k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  3.30k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 3.30k, False: 45.5k]
  ------------------
 1089|  3.30k|    state->level -= 1;
 1090|  3.30k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 278, False: 3.02k]
  ------------------
 1091|    278|      state->handler = declClose;
 1092|    278|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    278|    }
 1094|  3.30k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  2.21k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  2.21k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 2.21k, False: 46.6k]
  ------------------
 1096|  2.21k|    state->level -= 1;
 1097|  2.21k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 237, False: 1.97k]
  ------------------
 1098|    237|      state->handler = declClose;
 1099|    237|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    237|    }
 1101|  2.21k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  1.89k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  1.89k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 1.89k, False: 46.9k]
  ------------------
 1103|  1.89k|    state->level -= 1;
 1104|  1.89k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 52, False: 1.84k]
  ------------------
 1105|     52|      state->handler = declClose;
 1106|     52|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|     52|    }
 1108|  1.89k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  7.02k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  7.02k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 7.02k, False: 41.7k]
  ------------------
 1110|  7.02k|    state->handler = element6;
 1111|  7.02k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  13.0k|  case XML_TOK_OR:
  ------------------
  |  |   88|  13.0k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 13.0k, False: 35.7k]
  ------------------
 1113|  13.0k|    state->handler = element6;
 1114|  13.0k|    return XML_ROLE_GROUP_CHOICE;
 1115|  48.8k|  }
 1116|     60|  return common(state, tok);
 1117|  48.8k|}
xmlrole.c:notation0:
  616|  3.44k|          const ENCODING *enc) {
  617|  3.44k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.44k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  3.44k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.44k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  3.44k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.44k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  3.44k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 5, False: 3.43k]
  ------------------
  621|  1.72k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.72k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 1.72k, False: 1.71k]
  ------------------
  622|  1.72k|    return XML_ROLE_NOTATION_NONE;
  623|  1.70k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.70k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 1.70k, False: 1.73k]
  ------------------
  624|  1.70k|    state->handler = notation1;
  625|  1.70k|    return XML_ROLE_NOTATION_NAME;
  626|  3.44k|  }
  627|      5|  return common(state, tok);
  628|  3.44k|}
xmlrole.c:notation1:
  632|  3.40k|          const ENCODING *enc) {
  633|  3.40k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 4, False: 3.40k]
  ------------------
  634|  1.70k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.70k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 1.70k, False: 1.70k]
  ------------------
  635|  1.70k|    return XML_ROLE_NOTATION_NONE;
  636|  1.69k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.69k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 1.69k, False: 1.71k]
  ------------------
  637|  1.69k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.69k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 286, False: 1.41k]
  |  |  ------------------
  ------------------
  638|    286|      state->handler = notation3;
  639|    286|      return XML_ROLE_NOTATION_NONE;
  640|    286|    }
  641|  1.41k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.41k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.40k, False: 4]
  |  |  ------------------
  ------------------
  642|  1.40k|      state->handler = notation2;
  643|  1.40k|      return XML_ROLE_NOTATION_NONE;
  644|  1.40k|    }
  645|      4|    break;
  646|  3.40k|  }
  647|      8|  return common(state, tok);
  648|  3.40k|}
xmlrole.c:notation3:
  668|    567|          const ENCODING *enc) {
  669|    567|  UNUSED_P(ptr);
  ------------------
  |  |  135|    567|#  define UNUSED_P(p) (void)p
  ------------------
  670|    567|  UNUSED_P(end);
  ------------------
  |  |  135|    567|#  define UNUSED_P(p) (void)p
  ------------------
  671|    567|  UNUSED_P(enc);
  ------------------
  |  |  135|    567|#  define UNUSED_P(p) (void)p
  ------------------
  672|    567|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 2, False: 565]
  ------------------
  673|    285|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    285|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 285, False: 282]
  ------------------
  674|    285|    return XML_ROLE_NOTATION_NONE;
  675|    280|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    280|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 280, False: 287]
  ------------------
  676|    280|    state->handler = declClose;
  677|    280|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    280|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    567|  }
  680|      2|  return common(state, tok);
  681|    567|}
xmlrole.c:notation2:
  652|  2.80k|          const ENCODING *enc) {
  653|  2.80k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.80k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  2.80k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.80k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  2.80k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.80k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  2.80k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 1, False: 2.80k]
  ------------------
  657|  1.40k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.40k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 1.40k, False: 1.40k]
  ------------------
  658|  1.40k|    return XML_ROLE_NOTATION_NONE;
  659|  1.40k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.40k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 1.40k, False: 1.40k]
  ------------------
  660|  1.40k|    state->handler = notation4;
  661|  1.40k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  2.80k|  }
  663|      1|  return common(state, tok);
  664|  2.80k|}
xmlrole.c:notation4:
  685|  2.12k|          const ENCODING *enc) {
  686|  2.12k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.12k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  2.12k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.12k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  2.12k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.12k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  2.12k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 2, False: 2.12k]
  ------------------
  690|    736|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    736|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 736, False: 1.39k]
  ------------------
  691|    736|    return XML_ROLE_NOTATION_NONE;
  692|    249|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    249|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 249, False: 1.87k]
  ------------------
  693|    249|    state->handler = declClose;
  694|    249|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    249|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|  1.14k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.14k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 1.14k, False: 987]
  ------------------
  697|  1.14k|    setTopLevel(state);
  ------------------
  |  |  116|  1.14k|    ((state)->handler                                                          \
  |  |  117|  1.14k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.14k, False: 0]
  |  |  ------------------
  ------------------
  698|  1.14k|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  2.12k|  }
  700|      2|  return common(state, tok);
  701|  2.12k|}
xmlrole.c:doctype5:
  319|  2.27k|         const ENCODING *enc) {
  320|  2.27k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.27k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.27k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.27k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.27k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.27k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.27k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 4, False: 2.27k]
  ------------------
  324|     46|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     46|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 46, False: 2.23k]
  ------------------
  325|     46|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.22k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.22k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.22k, False: 50]
  ------------------
  327|  2.22k|    state->handler = prolog2;
  328|  2.22k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.27k|  }
  330|      4|  return common(state, tok);
  331|  2.27k|}
xmlrole.c:prolog2:
  205|  3.25k|        const ENCODING *enc) {
  206|  3.25k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.25k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.25k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.25k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.25k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.25k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.25k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 19, False: 3.23k]
  ------------------
  210|    367|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    367|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 367, False: 2.88k]
  ------------------
  211|    367|    return XML_ROLE_NONE;
  212|    457|  case XML_TOK_PI:
  ------------------
  |  |   76|    457|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 457, False: 2.79k]
  ------------------
  213|    457|    return XML_ROLE_PI;
  214|    194|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 194, False: 3.06k]
  ------------------
  215|    194|    return XML_ROLE_COMMENT;
  216|  2.21k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.21k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.21k, False: 1.03k]
  ------------------
  217|  2.21k|    state->handler = error;
  218|  2.21k|    return XML_ROLE_INSTANCE_START;
  219|  3.25k|  }
  220|     19|  return common(state, tok);
  221|  3.25k|}
xmlrole.c:doctype3:
  284|    591|         const ENCODING *enc) {
  285|    591|  UNUSED_P(ptr);
  ------------------
  |  |  135|    591|#  define UNUSED_P(p) (void)p
  ------------------
  286|    591|  UNUSED_P(end);
  ------------------
  |  |  135|    591|#  define UNUSED_P(p) (void)p
  ------------------
  287|    591|  UNUSED_P(enc);
  ------------------
  |  |  135|    591|#  define UNUSED_P(p) (void)p
  ------------------
  288|    591|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 110, False: 481]
  ------------------
  289|    441|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    441|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 441, False: 150]
  ------------------
  290|    441|    return XML_ROLE_DOCTYPE_NONE;
  291|     40|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     40|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 40, False: 551]
  ------------------
  292|     40|    state->handler = doctype4;
  293|     40|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    591|  }
  295|    110|  return common(state, tok);
  296|    591|}
xmlrole.c:doctype4:
  300|     49|         const ENCODING *enc) {
  301|     49|  UNUSED_P(ptr);
  ------------------
  |  |  135|     49|#  define UNUSED_P(p) (void)p
  ------------------
  302|     49|  UNUSED_P(end);
  ------------------
  |  |  135|     49|#  define UNUSED_P(p) (void)p
  ------------------
  303|     49|  UNUSED_P(enc);
  ------------------
  |  |  135|     49|#  define UNUSED_P(p) (void)p
  ------------------
  304|     49|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 10, False: 39]
  ------------------
  305|     27|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     27|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 27, False: 22]
  ------------------
  306|     27|    return XML_ROLE_DOCTYPE_NONE;
  307|     10|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|     10|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 10, False: 39]
  ------------------
  308|     10|    state->handler = internalSubset;
  309|     10|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  310|      2|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|      2|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (310:3): [True: 2, False: 47]
  ------------------
  311|      2|    state->handler = prolog2;
  312|      2|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     49|  }
  314|     10|  return common(state, tok);
  315|     49|}
xmlrole.c:doctype2:
  268|  1.44k|         const ENCODING *enc) {
  269|  1.44k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.44k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.44k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.44k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.44k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.44k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.44k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 8, False: 1.43k]
  ------------------
  273|    725|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    725|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 725, False: 720]
  ------------------
  274|    725|    return XML_ROLE_DOCTYPE_NONE;
  275|    712|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    712|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 712, False: 733]
  ------------------
  276|    712|    state->handler = doctype3;
  277|    712|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.44k|  }
  279|      8|  return common(state, tok);
  280|  1.44k|}
xmlrole.c:common:
 1225|  1.31k|common(PROLOG_STATE *state, int tok) {
 1226|  1.31k|#ifdef XML_DTD
 1227|  1.31k|  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.31k]
  |  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.31k|  state->handler = error;
 1233|  1.31k|  return XML_ROLE_ERROR;
 1234|  1.31k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  22.6M|                                           const char **fromLimRef) {
  328|  22.6M|  const char *fromLim = *fromLimRef;
  329|  22.6M|  size_t walked = 0;
  330|  35.1M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 35.1M, False: 6.05k]
  ------------------
  331|  35.1M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  35.1M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 915k, False: 34.1M]
  ------------------
  333|  35.1M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|   915k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 915k, False: 275]
  ------------------
  335|   915k|        fromLim += 4 - 1;
  336|   915k|        break;
  337|   915k|      } else {
  338|    275|        walked = 0;
  339|    275|      }
  340|  34.1M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 4.72M, False: 29.4M]
  ------------------
  341|  34.1M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|  4.72M|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 4.72M, False: 1.27k]
  ------------------
  343|  4.72M|        fromLim += 3 - 1;
  344|  4.72M|        break;
  345|  4.72M|      } else {
  346|  1.27k|        walked = 0;
  347|  1.27k|      }
  348|  29.4M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 262k, False: 29.1M]
  ------------------
  349|  29.4M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|   262k|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 262k, False: 272]
  ------------------
  351|   262k|        fromLim += 2 - 1;
  352|   262k|        break;
  353|   262k|      } else {
  354|    272|        walked = 0;
  355|    272|      }
  356|  29.1M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 16.7M, False: 12.4M]
  ------------------
  357|  29.1M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  16.7M|      break;
  359|  16.7M|    }
  360|  35.1M|  }
  361|  22.6M|  *fromLimRef = fromLim;
  362|  22.6M|}
XmlUtf8Encode:
 1255|  12.5k|XmlUtf8Encode(int c, char *buf) {
 1256|  12.5k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  12.5k|    min2 = 0x80,
 1259|  12.5k|    min3 = 0x800,
 1260|  12.5k|    min4 = 0x10000
 1261|  12.5k|  };
 1262|       |
 1263|  12.5k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 12.5k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  12.5k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 2.73k, False: 9.80k]
  ------------------
 1266|  2.73k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  2.73k|    return 1;
 1268|  2.73k|  }
 1269|  9.80k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 2.01k, False: 7.78k]
  ------------------
 1270|  2.01k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  2.01k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  2.01k|    return 2;
 1273|  2.01k|  }
 1274|  7.78k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 4.88k, False: 2.90k]
  ------------------
 1275|  4.88k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  4.88k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  4.88k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  4.88k|    return 3;
 1279|  4.88k|  }
 1280|  2.90k|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 2.90k, False: 0]
  ------------------
 1281|  2.90k|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|  2.90k|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|  2.90k|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|  2.90k|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|  2.90k|    return 4;
 1286|  2.90k|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|  2.90k|}
xmltok.c:checkCharRefNumber:
 1231|  20.2k|checkCharRefNumber(int result) {
 1232|  20.2k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 12.5k, False: 7.70k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 20.2k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 20.2k]
  ------------------
 1235|      9|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 20.2k]
  ------------------
 1236|     12|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 20.2k]
  ------------------
 1237|     15|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 3, False: 20.2k]
  ------------------
 1238|     23|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 8, False: 20.2k]
  ------------------
 1239|     26|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 20.2k]
  ------------------
 1240|     29|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 20.2k]
  ------------------
 1241|     29|    return -1;
 1242|  6.62k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 6.62k, False: 13.6k]
  ------------------
 1243|  6.62k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 120, False: 6.50k]
  ------------------
 1244|    120|      return -1;
 1245|  6.50k|    break;
 1246|  6.50k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 1.05k, False: 19.2k]
  ------------------
 1247|  1.05k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 3, False: 1.04k]
  |  Branch (1247:29): [True: 9, False: 1.03k]
  ------------------
 1248|     12|      return -1;
 1249|  1.03k|    break;
 1250|  20.2k|  }
 1251|  20.1k|  return result;
 1252|  20.2k|}
xmltok.c:utf8_toUtf8:
  366|  22.6M|            char **toP, const char *toLim) {
  367|  22.6M|  bool input_incomplete = false;
  368|  22.6M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  22.6M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  22.6M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  22.6M|  UNUSED_P(enc);
  ------------------
  |  |  135|  22.6M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  22.6M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 12.0k, False: 22.6M]
  ------------------
  375|  12.0k|    fromLim = *fromP + bytesStorable;
  376|  12.0k|    output_exhausted = true;
  377|  12.0k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  22.6M|  {
  381|  22.6M|    const char *const fromLimBefore = fromLim;
  382|  22.6M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  22.6M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 1.81k, False: 22.6M]
  ------------------
  384|  1.81k|      input_incomplete = true;
  385|  1.81k|    }
  386|  22.6M|  }
  387|       |
  388|  22.6M|  {
  389|  22.6M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  22.6M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  22.6M|    *fromP += bytesToCopy;
  392|  22.6M|    *toP += bytesToCopy;
  393|  22.6M|  }
  394|       |
  395|  22.6M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 12.0k, False: 22.6M]
  ------------------
  396|  12.0k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  22.6M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 22.6M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  22.6M|  else
  400|  22.6M|    return XML_CONVERT_COMPLETED;
  401|  22.6M|}
xmltok.c:utf8_isName2:
  140|   325k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|   325k|  UNUSED_P(enc);
  ------------------
  |  |  135|   325k|#  define UNUSED_P(p) (void)p
  ------------------
  142|   325k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|   325k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   325k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   325k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|   325k|}
xmltok.c:utf8_isName3:
  146|   348k|utf8_isName3(const ENCODING *enc, const char *p) {
  147|   348k|  UNUSED_P(enc);
  ------------------
  |  |  135|   348k|#  define UNUSED_P(p) (void)p
  ------------------
  148|   348k|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|   348k|  (namingBitmap                                                                \
  |  |   97|   348k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|   348k|         << 3)                                                                 \
  |  |   99|   348k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|   348k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|   348k|}
xmltok.c:isNever:
  133|    158|isNever(const ENCODING *enc, const char *p) {
  134|    158|  UNUSED_P(enc);
  ------------------
  |  |  135|    158|#  define UNUSED_P(p) (void)p
  ------------------
  135|    158|  UNUSED_P(p);
  ------------------
  |  |  135|    158|#  define UNUSED_P(p) (void)p
  ------------------
  136|    158|  return 0;
  137|    158|}
xmltok.c:utf8_isNmstrt2:
  154|   296k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|   296k|  UNUSED_P(enc);
  ------------------
  |  |  135|   296k|#  define UNUSED_P(p) (void)p
  ------------------
  156|   296k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|   296k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   296k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   296k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|   296k|}
xmltok.c:utf8_isNmstrt3:
  160|  12.0k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  12.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.0k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  12.0k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  12.0k|  (namingBitmap                                                                \
  |  |   97|  12.0k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  12.0k|         << 3)                                                                 \
  |  |   99|  12.0k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  12.0k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  12.0k|}
xmltok.c:utf8_isInvalid2:
  168|   799k|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|   799k|  UNUSED_P(enc);
  ------------------
  |  |  135|   799k|#  define UNUSED_P(p) (void)p
  ------------------
  170|   799k|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|   799k|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 24, False: 799k]
  |  |  |  Branch (113:19): [True: 96, False: 799k]
  |  |  |  Branch (113:43): [True: 64, False: 799k]
  |  |  ------------------
  ------------------
  171|   799k|}
xmltok.c:utf8_isInvalid3:
  174|  30.5M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  30.5M|  UNUSED_P(enc);
  ------------------
  |  |  135|  30.5M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  30.5M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  30.5M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 62, False: 30.5M]
  |  |  ------------------
  |  |  117|  30.5M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 53, False: 30.5M]
  |  |  |  Branch (117:8): [True: 634k, False: 29.8M]
  |  |  |  Branch (117:24): [True: 16.5k, False: 618k]
  |  |  ------------------
  |  |  118|  30.5M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  30.5M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 35, False: 30.5M]
  |  |  |  Branch (119:8): [True: 5.53M, False: 24.9M]
  |  |  ------------------
  |  |  120|  30.5M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 12, False: 5.53M]
  |  |  |  Branch (120:31): [True: 2, False: 5.53M]
  |  |  ------------------
  |  |  121|  30.5M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 10, False: 24.9M]
  |  |  ------------------
  |  |  122|  24.9M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 11, False: 24.9M]
  |  |  |  Branch (122:22): [True: 230k, False: 24.7M]
  |  |  ------------------
  ------------------
  177|  30.5M|}
xmltok.c:utf8_isInvalid4:
  180|  1.63M|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|  1.63M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.63M|#  define UNUSED_P(p) (void)p
  ------------------
  182|  1.63M|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|  1.63M|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 126, False: 1.63M]
  |  |  |  Branch (125:28): [True: 56, False: 1.63M]
  |  |  |  Branch (125:55): [True: 7, False: 1.63M]
  |  |  ------------------
  |  |  126|  1.63M|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 13, False: 1.63M]
  |  |  ------------------
  |  |  127|  1.63M|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 50, False: 1.63M]
  |  |  |  Branch (127:8): [True: 16.1k, False: 1.62M]
  |  |  ------------------
  |  |  128|  1.63M|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 12, False: 16.1k]
  |  |  |  Branch (128:31): [True: 10, False: 16.0k]
  |  |  ------------------
  |  |  129|  1.63M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 4, False: 1.62M]
  |  |  ------------------
  |  |  130|  1.62M|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 24, False: 1.62M]
  |  |  |  Branch (130:22): [True: 348k, False: 1.27M]
  |  |  ------------------
  ------------------
  183|  1.63M|}
xmltok.c:unicode_byte_type:
  595|   137M|unicode_byte_type(char hi, char lo) {
  596|   137M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 135M, False: 2.73M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   297k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 297k, False: 137M]
  ------------------
  599|   458k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 160k, False: 137M]
  ------------------
  600|  1.97M|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 1.51M, False: 136M]
  ------------------
  601|  2.58M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 615k, False: 137M]
  ------------------
  602|  2.58M|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|    100|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 100, False: 137M]
  ------------------
  605|    197|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 97, False: 137M]
  ------------------
  606|    294|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 97, False: 137M]
  ------------------
  607|    395|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 101, False: 137M]
  ------------------
  608|    395|    return BT_TRAIL;
  609|   146k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 146k, False: 137M]
  ------------------
  610|   146k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 146k, False: 225]
  ------------------
  611|    214|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 214, False: 146k]
  ------------------
  612|    225|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 11, False: 146k]
  ------------------
  613|    225|      return BT_NONXML;
  614|   146k|    }
  615|   146k|    break;
  616|   137M|  }
  617|   135M|  return BT_NONASCII;
  618|   137M|}
xmltok.c:little2_toUtf8:
  623|  90.2k|      char **toP, const char *toLim) {                                         \
  624|  90.2k|    const char *from = *fromP;                                                 \
  625|  90.2k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|  90.2k|#  define UNUSED_P(p) (void)p
  ------------------
  626|  90.2k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  8.34M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 8.25M, False: 87.6k]
  ------------------
  628|  8.25M|      int plane;                                                               \
  629|  8.25M|      unsigned char lo2;                                                       \
  630|  8.25M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  8.25M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  8.25M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  8.25M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  8.25M|      switch (hi) {                                                            \
  633|   203k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 203k, False: 8.05M]
  ------------------
  634|   203k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 182k, False: 20.1k]
  ------------------
  635|   182k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 605, False: 182k]
  ------------------
  636|    605|            *fromP = from;                                                     \
  637|    605|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    605|          }                                                                    \
  639|   182k|          *(*toP)++ = lo;                                                      \
  640|   182k|          break;                                                               \
  641|   182k|        }                                                                      \
  642|   203k|        /* fall through */                                                     \
  643|   203k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 8.20k, False: 8.24M]
  ------------------
  644|  43.3k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 15.0k, False: 8.24M]
  ------------------
  645|  46.5k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 3.17k, False: 8.25M]
  ------------------
  646|  91.7k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 45.1k, False: 8.21M]
  ------------------
  647|   108k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 16.6k, False: 8.24M]
  ------------------
  648|   112k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 3.98k, False: 8.25M]
  ------------------
  649|   113k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.04k, False: 8.25M]
  ------------------
  650|   113k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 264, False: 113k]
  ------------------
  651|    264|          *fromP = from;                                                       \
  652|    264|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    264|        }                                                                      \
  654|   113k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   113k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   113k|        break;                                                                 \
  657|  7.68M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 7.68M, False: 569k]
  ------------------
  658|  7.68M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 1.43k, False: 7.68M]
  ------------------
  659|  1.43k|          *fromP = from;                                                       \
  660|  1.43k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  1.43k|        }                                                                      \
  662|  7.68M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  7.68M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  7.68M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  7.68M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  7.68M|        break;                                                                 \
  667|  7.68M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 11.4k, False: 8.24M]
  ------------------
  668|  28.0k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 16.6k, False: 8.24M]
  ------------------
  669|   224k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 196k, False: 8.06M]
  ------------------
  670|   273k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 48.7k, False: 8.20M]
  ------------------
  671|   273k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 255, False: 272k]
  ------------------
  672|    255|          *fromP = from;                                                       \
  673|    255|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    255|        }                                                                      \
  675|   273k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 272k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   272k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   272k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   272k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   272k|        from += 2;                                                             \
  683|   272k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|   272k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|   272k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|   272k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|   272k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   272k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   272k|        break;                                                                 \
  688|  8.25M|      }                                                                        \
  689|  8.25M|    }                                                                          \
  690|  90.2k|    *fromP = from;                                                             \
  691|  87.6k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 87.6k]
  ------------------
  692|  87.6k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|  87.6k|    else                                                                       \
  694|  87.6k|      return XML_CONVERT_COMPLETED;                                            \
  695|  87.6k|  }
xmltok.c:getEncodingIndex:
 1502|  39.4k|getEncodingIndex(const char *name) {
 1503|  39.4k|  static const char *const encodingNames[] = {
 1504|  39.4k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  39.4k|  };
 1506|  39.4k|  int i;
 1507|  39.4k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 19.7k, False: 19.7k]
  ------------------
 1508|  19.7k|    return NO_ENC;
 1509|  98.8k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 98.7k, False: 40]
  ------------------
 1510|  98.7k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 19.7k, False: 79.0k]
  ------------------
 1511|  19.7k|      return i;
 1512|     40|  return UNKNOWN_ENC;
 1513|  19.7k|}
xmltok.c:streqci:
 1005|  98.8k|streqci(const char *s1, const char *s2) {
 1006|   473k|  for (;;) {
 1007|   473k|    char c1 = *s1++;
 1008|   473k|    char c2 = *s2++;
 1009|   473k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   473k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    173|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 173, False: 473k]
  |  Branch (1009:26): [True: 173, False: 0]
  ------------------
 1010|    173|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    173|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    173|#define ASCII_a 0x61
  ------------------
 1011|   473k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   473k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 473k]
  |  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|   473k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 79.1k, False: 394k]
  ------------------
 1018|  79.1k|      return 0;
 1019|   394k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 19.7k, False: 374k]
  ------------------
 1020|  19.7k|      break;
 1021|   394k|  }
 1022|  19.7k|  return 1;
 1023|  98.8k|}
xmltok.c:initScan:
 1531|  19.7k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  19.7k|  const ENCODING **encPtr;
 1533|       |
 1534|  19.7k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 19.7k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  19.7k|  encPtr = enc->encPtr;
 1537|  19.7k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 21, False: 19.6k]
  ------------------
 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|     21|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     21|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 0, False: 21]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 21]
  ------------------
 1548|      0|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 21]
  ------------------
 1549|     21|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 21, False: 0]
  ------------------
 1550|     21|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     21|    }
 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.6k|  } else {
 1564|  19.6k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|      1|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 1, False: 19.6k]
  ------------------
 1566|      1|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      1|#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: 1]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|      1|      *nextTokPtr = ptr + 2;
 1569|      1|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|      1|      return XML_TOK_BOM;
  ------------------
  |  |   79|      1|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  5.01k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 5.01k, False: 14.6k]
  ------------------
 1573|  5.01k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  5.01k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 5.01k, False: 0]
  ------------------
 1574|  5.01k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 0]
  ------------------
 1575|  5.01k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|  5.01k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 5.01k]
  ------------------
 1576|      0|        break;
 1577|  5.01k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  5.01k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.01k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      2|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 2, False: 19.6k]
  ------------------
 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.18k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 7.18k, 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.18k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  7.18k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 7.18k]
  ------------------
 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.18k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 7.18k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  7.18k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 7.17k, False: 13]
  ------------------
 1602|  7.17k|        *nextTokPtr = ptr + 3;
 1603|  7.17k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  7.17k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  7.17k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  7.17k|      }
 1606|     13|      break;
 1607|  7.47k|    default:
  ------------------
  |  Branch (1607:5): [True: 7.47k, False: 12.2k]
  ------------------
 1608|  7.47k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 6.43k, False: 1.04k]
  ------------------
 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.43k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  12.8k|#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.43k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  6.43k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  6.43k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.43k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  6.43k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 872, False: 171]
  ------------------
 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|    872|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    872|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 872]
  ------------------
 1630|      0|          break;
 1631|    872|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    872|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    872|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    872|      }
 1634|    171|      break;
 1635|  19.6k|    }
 1636|  19.6k|  }
 1637|    184|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|    184|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|    184|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    184|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  19.7k|}
xmltok.c:big2_toUtf8:
  623|   305k|      char **toP, const char *toLim) {                                         \
  624|   305k|    const char *from = *fromP;                                                 \
  625|   305k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   305k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   305k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  45.7M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 45.4M, False: 298k]
  ------------------
  628|  45.4M|      int plane;                                                               \
  629|  45.4M|      unsigned char lo2;                                                       \
  630|  45.4M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  45.4M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  45.4M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  45.4M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  45.4M|      switch (hi) {                                                            \
  633|   677k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 677k, False: 44.8M]
  ------------------
  634|   677k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 625k, False: 52.6k]
  ------------------
  635|   625k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 527, False: 624k]
  ------------------
  636|    527|            *fromP = from;                                                     \
  637|    527|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    527|          }                                                                    \
  639|   625k|          *(*toP)++ = lo;                                                      \
  640|   624k|          break;                                                               \
  641|   625k|        }                                                                      \
  642|   677k|        /* fall through */                                                     \
  643|   677k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 10.4k, False: 45.4M]
  ------------------
  644|  71.0k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 7.86k, False: 45.4M]
  ------------------
  645|  78.3k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 7.29k, False: 45.4M]
  ------------------
  646|  97.2k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 18.9k, False: 45.4M]
  ------------------
  647|   108k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 11.1k, False: 45.4M]
  ------------------
  648|   114k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 6.39k, False: 45.4M]
  ------------------
  649|   122k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 8.09k, False: 45.4M]
  ------------------
  650|   122k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 368, False: 122k]
  ------------------
  651|    368|          *fromP = from;                                                       \
  652|    368|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    368|        }                                                                      \
  654|   122k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   122k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   122k|        break;                                                                 \
  657|  44.3M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 44.3M, False: 1.16M]
  ------------------
  658|  44.3M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 5.57k, False: 44.3M]
  ------------------
  659|  5.57k|          *fromP = from;                                                       \
  660|  5.57k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  5.57k|        }                                                                      \
  662|  44.3M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  44.3M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  44.3M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  44.3M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  44.3M|        break;                                                                 \
  667|  44.3M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 91.7k, False: 45.3M]
  ------------------
  668|   124k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 32.3k, False: 45.4M]
  ------------------
  669|   275k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 151k, False: 45.3M]
  ------------------
  670|   421k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 145k, False: 45.3M]
  ------------------
  671|   421k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 576, False: 420k]
  ------------------
  672|    576|          *fromP = from;                                                       \
  673|    576|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    576|        }                                                                      \
  675|   421k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 420k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   420k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   420k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   420k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   420k|        from += 2;                                                             \
  683|   420k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|   420k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|   420k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|   420k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|   420k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   420k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   420k|        break;                                                                 \
  688|  45.4M|      }                                                                        \
  689|  45.4M|    }                                                                          \
  690|   305k|    *fromP = from;                                                             \
  691|   298k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 298k]
  ------------------
  692|   298k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   298k|    else                                                                       \
  694|   298k|      return XML_CONVERT_COMPLETED;                                            \
  695|   298k|  }
xmltok.c:initUpdatePosition:
 1027|     22|                   POSITION *pos) {
 1028|     22|  UNUSED_P(enc);
  ------------------
  |  |  135|     22|#  define UNUSED_P(p) (void)p
  ------------------
 1029|     22|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|     22|}
xmltok.c:doParseXmlDecl:
 1155|    303|               const ENCODING **encoding, int *standalone) {
 1156|    303|  const char *val = NULL;
 1157|    303|  const char *name = NULL;
 1158|    303|  const char *nameEnd = NULL;
 1159|    303|  ptr += 5 * enc->minBytesPerChar;
 1160|    303|  end -= 2 * enc->minBytesPerChar;
 1161|    303|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 176, False: 127]
  ------------------
 1162|    303|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 14, False: 113]
  ------------------
 1163|    190|    *badPtr = ptr;
 1164|    190|    return 0;
 1165|    190|  }
 1166|    113|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    113|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 4, False: 109]
  ------------------
 1167|      4|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 4, False: 0]
  ------------------
 1168|      4|      *badPtr = name;
 1169|      4|      return 0;
 1170|      4|    }
 1171|    109|  } else {
 1172|    109|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 109, False: 0]
  ------------------
 1173|    109|      *versionPtr = val;
 1174|    109|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 109, False: 0]
  ------------------
 1175|    109|      *versionEndPtr = ptr;
 1176|    109|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 14, False: 95]
  ------------------
 1177|     14|      *badPtr = ptr;
 1178|     14|      return 0;
 1179|     14|    }
 1180|     95|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 5, False: 90]
  ------------------
 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|     95|  }
 1189|     90|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     90|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 47, False: 43]
  |  |  ------------------
  ------------------
 1190|     47|    int c = toAscii(enc, val, end);
 1191|     47|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     47|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     17|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     30|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     28|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 17, False: 30]
  |  Branch (1191:28): [True: 17, False: 0]
  |  Branch (1191:48): [True: 28, False: 2]
  |  Branch (1191:64): [True: 27, False: 1]
  ------------------
 1192|      3|      *badPtr = val;
 1193|      3|      return 0;
 1194|      3|    }
 1195|     44|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 44, False: 0]
  ------------------
 1196|     44|      *encodingName = val;
 1197|     44|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 44, False: 0]
  ------------------
 1198|     44|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     44|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 3, False: 41]
  ------------------
 1200|      3|      *badPtr = ptr;
 1201|      3|      return 0;
 1202|      3|    }
 1203|     41|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 39, False: 2]
  ------------------
 1204|     39|      return 1;
 1205|     41|  }
 1206|     45|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|     90|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 5, False: 40]
  ------------------
 1207|     45|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 40]
  ------------------
 1208|      5|    *badPtr = name;
 1209|      5|    return 0;
 1210|      5|  }
 1211|     40|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     40|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 26, False: 14]
  |  |  ------------------
  ------------------
 1212|     26|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 26, False: 0]
  ------------------
 1213|     26|      *standalone = 1;
 1214|     26|  } 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|    233|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 194, False: 39]
  ------------------
 1222|    194|    ptr += enc->minBytesPerChar;
 1223|     39|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 6, False: 33]
  ------------------
 1224|      6|    *badPtr = ptr;
 1225|      6|    return 0;
 1226|      6|  }
 1227|     33|  return 1;
 1228|     39|}
xmltok.c:parsePseudoAttribute:
 1061|    456|                     const char **valPtr, const char **nextTokPtr) {
 1062|    456|  int c;
 1063|    456|  char open;
 1064|    456|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 43, False: 413]
  ------------------
 1065|     43|    *namePtr = NULL;
 1066|     43|    return 1;
 1067|     43|  }
 1068|    413|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 3, False: 410]
  ------------------
 1069|      3|    *nextTokPtr = ptr;
 1070|      3|    return 0;
 1071|      3|  }
 1072|    771|  do {
 1073|    771|    ptr += enc->minBytesPerChar;
 1074|    771|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 361, False: 410]
  ------------------
 1075|    410|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 15, False: 395]
  ------------------
 1076|     15|    *namePtr = NULL;
 1077|     15|    return 1;
 1078|     15|  }
 1079|    395|  *namePtr = ptr;
 1080|  2.59k|  for (;;) {
 1081|  2.59k|    c = toAscii(enc, ptr, end);
 1082|  2.59k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 43, False: 2.55k]
  ------------------
 1083|     43|      *nextTokPtr = ptr;
 1084|     43|      return 0;
 1085|     43|    }
 1086|  2.55k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.55k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 316, False: 2.23k]
  ------------------
 1087|    316|      *nameEndPtr = ptr;
 1088|    316|      break;
 1089|    316|    }
 1090|  2.23k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 36, False: 2.19k]
  ------------------
 1091|     36|      *nameEndPtr = ptr;
 1092|    284|      do {
 1093|    284|        ptr += enc->minBytesPerChar;
 1094|    284|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 248, False: 36]
  ------------------
 1095|     36|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     36|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 27, False: 9]
  ------------------
 1096|     27|        *nextTokPtr = ptr;
 1097|     27|        return 0;
 1098|     27|      }
 1099|      9|      break;
 1100|     36|    }
 1101|  2.19k|    ptr += enc->minBytesPerChar;
 1102|  2.19k|  }
 1103|    325|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 5, False: 320]
  ------------------
 1104|      5|    *nextTokPtr = ptr;
 1105|      5|    return 0;
 1106|      5|  }
 1107|    320|  ptr += enc->minBytesPerChar;
 1108|    320|  c = toAscii(enc, ptr, end);
 1109|    555|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 235, False: 320]
  ------------------
 1110|    235|    ptr += enc->minBytesPerChar;
 1111|    235|    c = toAscii(enc, ptr, end);
 1112|    235|  }
 1113|    320|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    640|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     86|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 86, False: 234]
  |  Branch (1113:26): [True: 31, False: 55]
  ------------------
 1114|     31|    *nextTokPtr = ptr;
 1115|     31|    return 0;
 1116|     31|  }
 1117|    289|  open = (char)c;
 1118|    289|  ptr += enc->minBytesPerChar;
 1119|    289|  *valPtr = ptr;
 1120|  2.31k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.31k|    c = toAscii(enc, ptr, end);
 1122|  2.31k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 205, False: 2.11k]
  ------------------
 1123|    205|      break;
 1124|  2.11k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  2.11k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    337|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.77k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    810|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 337, False: 1.77k]
  |  Branch (1124:28): [True: 335, False: 2]
  |  Branch (1124:48): [True: 810, False: 967]
  |  Branch (1124:64): [True: 609, False: 201]
  ------------------
 1125|  2.11k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.16k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    462|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  3.02k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 462, False: 706]
  |  Branch (1125:31): [True: 257, False: 205]
  |  Branch (1125:48): [True: 654, False: 257]
  ------------------
 1126|  2.11k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.76k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    280|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 280, False: 374]
  |  Branch (1126:32): [True: 84, False: 196]
  ------------------
 1127|     84|      *nextTokPtr = ptr;
 1128|     84|      return 0;
 1129|     84|    }
 1130|  2.11k|  }
 1131|    205|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    205|  return 1;
 1133|    289|}
xmltok.c:toAscii:
 1033|  7.21k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  7.21k|  char buf[1];
 1035|  7.21k|  char *p = buf;
 1036|  7.21k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  7.21k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  7.21k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 215, False: 6.99k]
  ------------------
 1038|    215|    return -1;
 1039|  6.99k|  else
 1040|  6.99k|    return buf[0];
 1041|  7.21k|}
xmltok.c:isSpace:
 1044|  4.49k|isSpace(int c) {
 1045|  4.49k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.00k, False: 1.48k]
  ------------------
 1046|    496|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 496, False: 3.99k]
  ------------------
 1047|    944|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 448, False: 4.04k]
  ------------------
 1048|  1.28k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 345, False: 4.14k]
  ------------------
 1049|  1.48k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 195, False: 4.29k]
  ------------------
 1050|  1.48k|    return 1;
 1051|  4.49k|  }
 1052|  3.00k|  return 0;
 1053|  4.49k|}

xmltok.c:normal_prologTok:
 1018|  3.33M|                  const char **nextTokPtr) {
 1019|  3.33M|  int tok;
 1020|  3.33M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 1.20k, False: 3.32M]
  ------------------
 1021|  1.20k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.20k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  3.32M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  3.32M|#  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|  3.32M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.32M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.32M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  4.19k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 4.19k, False: 3.32M]
  ------------------
 1033|  4.19k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.19k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.19k|#  define MINBPC(enc) 1
  ------------------
 1034|  14.5k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 14.5k, False: 3.31M]
  ------------------
 1035|  14.5k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  14.5k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  14.5k|#  define MINBPC(enc) 1
  ------------------
 1036|  33.5k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 33.5k, False: 3.29M]
  ------------------
 1037|  33.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  33.5k|#  define MINBPC(enc) 1
  ------------------
 1038|  33.5k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  33.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  33.5k|    {                                                                          \
  |  |  |  |  135|  33.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  33.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  33.5k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 33.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  33.5k|    }
  |  |  ------------------
  ------------------
 1039|  33.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  33.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  33.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 15, False: 33.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  25.9k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 25.9k, False: 7.49k]
  ------------------
 1041|  25.9k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  25.9k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  25.9k|#  define MINBPC(enc) 1
  ------------------
 1042|  3.80k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.80k, False: 29.6k]
  ------------------
 1043|  3.80k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.80k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.80k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.81k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.81k, False: 30.6k]
  ------------------
 1045|  3.60k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 796, False: 32.6k]
  ------------------
 1046|  3.60k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 33.4k]
  ------------------
 1047|  3.64k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 34, False: 33.4k]
  ------------------
 1048|  3.67k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 31, False: 33.4k]
  ------------------
 1049|  3.67k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 33.4k]
  ------------------
 1050|  3.67k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  3.67k|#  define MINBPC(enc) 1
  ------------------
 1051|  3.67k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.67k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  33.4k|    }
 1053|     15|    *nextTokPtr = ptr;
 1054|     15|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
 1055|  33.4k|  }
 1056|  29.9k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 29.9k, False: 3.29M]
  ------------------
 1057|  29.9k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|  29.9k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 157, False: 29.7k]
  ------------------
 1058|    157|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    157|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    157|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    157|    }
 1062|       |    /* fall through */
 1063|  68.8k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 39.0k, False: 3.29M]
  ------------------
 1064|   102k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 33.2k, False: 3.29M]
  ------------------
 1065|   107k|    for (;;) {
 1066|   107k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   107k|#  define MINBPC(enc) 1
  ------------------
 1067|   107k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   107k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   107k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   107k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 624, False: 106k]
  ------------------
 1068|    624|        break;
 1069|   106k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   106k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   106k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  1.69k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.69k, False: 105k]
  ------------------
 1071|  3.68k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.99k, False: 104k]
  ------------------
 1072|  3.68k|        break;
 1073|  1.82k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 1.82k, False: 105k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  1.82k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|  1.82k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 1.81k, False: 10]
  ------------------
 1076|  1.81k|          break;
 1077|       |        /* fall through */
 1078|   101k|      default:
  ------------------
  |  Branch (1078:7): [True: 101k, False: 5.50k]
  ------------------
 1079|   101k|        *nextTokPtr = ptr;
 1080|   101k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   101k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   106k|      }
 1082|   106k|    }
 1083|    624|    *nextTokPtr = ptr;
 1084|    624|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    624|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  4.42k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 4.42k, False: 3.32M]
  ------------------
 1086|  4.42k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.42k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.42k|#  define MINBPC(enc) 1
  ------------------
 1087|  2.77k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.77k, False: 3.32M]
  ------------------
 1088|  2.77k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.77k|#  define MINBPC(enc) 1
  ------------------
 1089|  2.77k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.77k|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.67k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.67k, False: 3.32M]
  ------------------
 1091|  2.67k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.67k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.67k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.67k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    969|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 969, False: 3.32M]
  ------------------
 1094|    969|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    969|#  define MINBPC(enc) 1
  ------------------
 1095|    969|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    969|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    969|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|    969|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 967]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    967|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|    967|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 13, False: 954]
  |  |  ------------------
  ------------------
 1098|     13|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     13|    {                                                                          \
  |  |  135|     13|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     13|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     13|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 12]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     13|    }
  ------------------
 1099|     12|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     12|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 11]
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     12|    }
 1104|    965|    *nextTokPtr = ptr;
 1105|    965|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    965|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  3.01M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 3.01M, False: 310k]
  ------------------
 1107|  3.01M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.01M|#  define MINBPC(enc) 1
  ------------------
 1108|  3.01M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  3.01M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  27.8k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 27.8k, False: 3.30M]
  ------------------
 1110|  27.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  27.8k|#  define MINBPC(enc) 1
  ------------------
 1111|  27.8k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  27.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  27.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  27.8k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 23, False: 27.8k]
  ------------------
 1112|     23|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     23|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  27.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  27.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  27.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 7, False: 27.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  6.98k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 6.98k, False: 20.8k]
  ------------------
 1115|  6.98k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.98k|#  define MINBPC(enc) 1
  ------------------
 1116|  6.98k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  6.98k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  1.29k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 1.29k, False: 26.5k]
  ------------------
 1118|  1.29k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.29k|#  define MINBPC(enc) 1
  ------------------
 1119|  1.29k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  1.29k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  1.45k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 1.45k, False: 26.4k]
  ------------------
 1121|  1.45k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.45k|#  define MINBPC(enc) 1
  ------------------
 1122|  1.45k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  1.45k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|  1.92k|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 1.92k, False: 25.9k]
  ------------------
 1124|  2.42k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 507, False: 27.3k]
  ------------------
 1125|  5.60k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 3.17k, False: 24.6k]
  ------------------
 1126|  6.34k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 738, False: 27.1k]
  ------------------
 1127|  7.77k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 1.43k, False: 26.4k]
  ------------------
 1128|  15.8k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 8.08k, False: 19.7k]
  ------------------
 1129|  18.1k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 2.26k, False: 25.5k]
  ------------------
 1130|  18.1k|      *nextTokPtr = ptr;
 1131|  18.1k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  18.1k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  27.8k|    }
 1133|      7|    *nextTokPtr = ptr;
 1134|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
 1135|  14.7k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 14.7k, False: 3.31M]
  ------------------
 1136|  14.7k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  14.7k|#  define MINBPC(enc) 1
  ------------------
 1137|  14.7k|    return XML_TOK_OR;
  ------------------
  |  |   88|  14.7k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  21.6k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 21.6k, False: 3.30M]
  ------------------
 1139|  21.6k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  21.6k|#  define MINBPC(enc) 1
  ------------------
 1140|  21.6k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  21.6k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  7.37k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 7.37k, False: 3.32M]
  ------------------
 1142|  7.37k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  7.37k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  7.37k|#  define MINBPC(enc) 1
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|  1.63k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      3|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 484, False: 3.32M]
  |  |  ------------------
  |  | 1145|    484|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 6, False: 478]
  |  |  ------------------
  |  | 1146|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    478|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    478|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    478|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 5, False: 473]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      5|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      5|    }                                                                          \
  |  | 1151|    478|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    473|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    473|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 271, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    271|      ptr += n;                                                                \
  |  | 1153|    271|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    271|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    271|      break;                                                                   \
  |  | 1155|    271|    }                                                                          \
  |  | 1156|    473|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    202|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    202|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 199, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    199|      ptr += n;                                                                \
  |  | 1158|    199|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    199|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    199|      break;                                                                   \
  |  | 1160|    199|    }                                                                          \
  |  | 1161|    202|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      3|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  2.35k|    LEAD_CASE(3)
  ------------------
  |  | 1144|     18|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 711, False: 3.32M]
  |  |  ------------------
  |  | 1145|    711|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 709]
  |  |  ------------------
  |  | 1146|     18|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    709|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    709|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    709|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 38, False: 671]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     38|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     38|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     38|    }                                                                          \
  |  | 1151|    709|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    671|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    671|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 410, False: 261]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    410|      ptr += n;                                                                \
  |  | 1153|    410|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    410|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    410|      break;                                                                   \
  |  | 1155|    410|    }                                                                          \
  |  | 1156|    671|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    261|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    261|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 243, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    243|      ptr += n;                                                                \
  |  | 1158|    243|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    243|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    243|      break;                                                                   \
  |  | 1160|    243|    }                                                                          \
  |  | 1161|    261|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    132|    LEAD_CASE(4)
  ------------------
  |  | 1144|     15|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 52, False: 3.32M]
  |  |  ------------------
  |  | 1145|     52|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 50]
  |  |  ------------------
  |  | 1146|     15|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     50|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     50|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     50|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 35, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     35|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     35|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     35|    }                                                                          \
  |  | 1151|     50|    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|  49.8k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 49.8k, False: 3.27M]
  ------------------
 1168|  70.3k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 20.4k, False: 3.30M]
  ------------------
 1169|  70.3k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  70.3k|#define XML_TOK_NAME 18
  ------------------
 1170|  70.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  70.3k|#  define MINBPC(enc) 1
  ------------------
 1171|  70.3k|    break;
 1172|    964|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 964, False: 3.32M]
  ------------------
 1173|  1.33k|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 369, False: 3.32M]
  ------------------
 1174|  1.59k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 259, False: 3.32M]
  ------------------
 1175|  1.59k|#  ifdef XML_NS
 1176|  1.59k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 3.32M]
  ------------------
 1177|  1.59k|#  endif
 1178|  1.59k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.59k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.59k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.59k|#  define MINBPC(enc) 1
  ------------------
 1180|  1.59k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 3.32M]
  ------------------
 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|     37|  default:
  ------------------
  |  Branch (1193:3): [True: 37, False: 3.32M]
  ------------------
 1194|     37|    *nextTokPtr = ptr;
 1195|     37|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
 1196|  3.32M|  }
 1197|   271k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|   271k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   271k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   271k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|   712k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   197k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 271k]
  |  |  ------------------
  |  |   82|   197k|    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|   197k|    /* fall through */                                                         \
  |  |   87|   197k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 146k, False: 125k]
  |  |  ------------------
  |  |   88|   178k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 32.1k, False: 238k]
  |  |  ------------------
  |  |   89|   191k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 13.4k, False: 257k]
  |  |  ------------------
  |  |   90|   195k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 3.77k, False: 267k]
  |  |  ------------------
  |  |   91|   197k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 2.16k, False: 268k]
  |  |  ------------------
  |  |   92|   197k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   197k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   197k|    break;                                                                     \
  |  |   94|   197k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    312|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 329, False: 270k]
  |  |  |  |  ------------------
  |  |  |  |   71|    329|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 328]
  |  |  |  |  ------------------
  |  |  |  |   72|    312|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    328|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    656|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    328|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 315]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    315|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    315|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 312]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|    328|    ptr += n;                                                                  \
  |  |  |  |   78|    312|    break;
  |  |  ------------------
  |  |   95|    331|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    320|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 331, False: 270k]
  |  |  |  |  ------------------
  |  |  |  |   71|    331|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 327]
  |  |  |  |  ------------------
  |  |  |  |   72|    320|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    327|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    654|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    327|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 324]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    324|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    324|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 320]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    327|    ptr += n;                                                                  \
  |  |  |  |   78|    320|    break;
  |  |  ------------------
  |  |   96|    320|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 271k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#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: 14, 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|     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|  6.27k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 6.27k, False: 264k]
  ------------------
 1201|  19.5k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 13.3k, False: 257k]
  ------------------
 1202|  19.8k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 300, False: 270k]
  ------------------
 1203|  23.8k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 3.93k, False: 267k]
  ------------------
 1204|  26.4k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.64k, False: 268k]
  ------------------
 1205|  26.4k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 4, False: 271k]
  ------------------
 1206|  39.8k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 13.3k, False: 257k]
  ------------------
 1207|  53.1k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 13.2k, False: 257k]
  ------------------
 1208|  68.7k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 15.6k, False: 255k]
  ------------------
 1209|  68.7k|      *nextTokPtr = ptr;
 1210|  68.7k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 271k]
  ------------------
 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|  2.39k|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 2.39k, False: 268k]
  ------------------
 1232|  2.39k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  2.39k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 2.39k]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|  2.39k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.39k|#  define MINBPC(enc) 1
  ------------------
 1237|  2.39k|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|  2.39k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    827|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 827, False: 270k]
  ------------------
 1239|    827|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    827|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 2, False: 825]
  ------------------
 1240|      2|        *nextTokPtr = ptr;
 1241|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1242|      2|      }
 1243|    825|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    825|#  define MINBPC(enc) 1
  ------------------
 1244|    825|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    825|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    834|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 834, False: 270k]
  ------------------
 1246|    834|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    834|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 2, False: 832]
  ------------------
 1247|      2|        *nextTokPtr = ptr;
 1248|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1249|      2|      }
 1250|    832|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    832|#  define MINBPC(enc) 1
  ------------------
 1251|    832|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    832|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     40|    default:
  ------------------
  |  Branch (1252:5): [True: 40, False: 271k]
  ------------------
 1253|     40|      *nextTokPtr = ptr;
 1254|     40|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     40|#define XML_TOK_INVALID 0
  ------------------
 1255|   271k|    }
 1256|   271k|  }
 1257|    197|  return -tok;
 1258|  73.0k|}
xmltok.c:normal_scanLit:
  984|  18.6k|                const char **nextTokPtr) {
  985|  10.4M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  10.4M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  10.4M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.4M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  10.4M|    switch (t) {
  988|  18.6k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.60k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.59k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.60k, False: 10.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.60k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 1.60k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.59k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.60k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.60k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.60k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|  1.60k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.59k|    break;
  |  |  ------------------
  |  |   61|  4.13k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.12k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.13k, False: 10.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.13k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 4.13k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.12k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.13k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.13k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.13k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 4.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  4.13k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.12k|    break;
  |  |  ------------------
  |  |   62|  4.12k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.54k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.56k, False: 10.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.56k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 3.55k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.54k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.55k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.55k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.55k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 3.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     13|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     13|    }                                                                          \
  |  |  |  |   56|  3.55k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.54k|    break;
  |  |  ------------------
  |  |   63|  3.54k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 10, False: 10.4M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 10.4M]
  |  |  ------------------
  |  |   65|     14|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 10.4M]
  |  |  ------------------
  |  |   66|     14|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     14|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  6.07k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 6.07k, False: 10.4M]
  ------------------
  990|  23.0k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 16.9k, False: 10.3M]
  ------------------
  991|  23.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  23.0k|#  define MINBPC(enc) 1
  ------------------
  992|  23.0k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 4.47k, False: 18.5k]
  ------------------
  993|  4.47k|        break;
  994|  18.5k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  18.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  18.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  18.5k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 9, False: 18.5k]
  ------------------
  995|      9|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      9|#define XML_TOK_LITERAL 27
  ------------------
  996|  18.5k|      *nextTokPtr = ptr;
  997|  18.5k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  18.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  18.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  9.04k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 9.04k, False: 9.52k]
  ------------------
  999|  11.4k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 2.39k, False: 16.1k]
  ------------------
 1000|  12.7k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.33k, False: 17.2k]
  ------------------
 1001|  18.5k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 5.76k, False: 12.8k]
  ------------------
 1002|  18.5k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 12, False: 18.5k]
  ------------------
 1003|  18.5k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 13, False: 18.5k]
  ------------------
 1004|  18.5k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  18.5k|#define XML_TOK_LITERAL 27
  ------------------
 1005|      9|      default:
  ------------------
  |  Branch (1005:7): [True: 9, False: 18.5k]
  ------------------
 1006|      9|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
 1007|  18.5k|      }
 1008|  10.3M|    default:
  ------------------
  |  Branch (1008:5): [True: 10.3M, False: 32.3k]
  ------------------
 1009|  10.3M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.3M|#  define MINBPC(enc) 1
  ------------------
 1010|  10.3M|      break;
 1011|  10.4M|    }
 1012|  10.4M|  }
 1013|     78|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     78|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  18.6k|}
xmltok.c:normal_scanDecl:
  183|  25.9k|                 const char **nextTokPtr) {
  184|  25.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  25.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  25.9k|    {                                                                          \
  |  |  |  |  135|  25.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  25.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  25.9k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 25.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  25.9k|    }
  |  |  ------------------
  ------------------
  185|  25.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  25.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  25.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|  1.06k|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 1.06k, False: 24.9k]
  ------------------
  187|  1.06k|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.06k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.06k|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 25.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|    932|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 932, False: 25.0k]
  ------------------
  192|  24.9k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 23.9k, False: 2.00k]
  ------------------
  193|  24.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  24.9k|#  define MINBPC(enc) 1
  ------------------
  194|  24.9k|    break;
  195|      8|  default:
  ------------------
  |  Branch (195:3): [True: 8, False: 25.9k]
  ------------------
  196|      8|    *nextTokPtr = ptr;
  197|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  198|  25.9k|  }
  199|   167k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   167k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   167k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   167k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|      7|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 7, False: 167k]
  ------------------
  202|      7|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|      7|    {                                                                          \
  |  |  135|      7|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|      7|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|      7|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 6]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|      7|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|      6|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|      6|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      6|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 1, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 5]
  ------------------
  206|      3|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 2, False: 4]
  ------------------
  207|      4|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 5]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 5]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|      6|      }
  212|       |      /* fall through */
  213|  7.26k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 7.26k, False: 160k]
  ------------------
  214|  14.7k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 7.45k, False: 160k]
  ------------------
  215|  24.8k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 10.1k, False: 157k]
  ------------------
  216|  24.8k|      *nextTokPtr = ptr;
  217|  24.8k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  24.8k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   123k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 123k, False: 44.2k]
  ------------------
  219|   142k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 19.3k, False: 148k]
  ------------------
  220|   142k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   142k|#  define MINBPC(enc) 1
  ------------------
  221|   142k|      break;
  222|     15|    default:
  ------------------
  |  Branch (222:5): [True: 15, False: 167k]
  ------------------
  223|     15|      *nextTokPtr = ptr;
  224|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  225|   167k|    }
  226|   167k|  }
  227|     32|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  24.9k|}
xmltok.c:normal_scanComment:
  146|  2.09k|                    const char **nextTokPtr) {
  147|  2.09k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  2.09k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.09k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  2.09k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 2.08k, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  2.08k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  2.08k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 10, False: 2.07k]
  ------------------
  149|     10|      *nextTokPtr = ptr;
  150|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  151|     10|    }
  152|  2.07k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.07k|#  define MINBPC(enc) 1
  ------------------
  153|  4.45M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  4.45M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.45M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.45M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  8.84M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  4.84k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.82k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.84k, False: 4.45M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.84k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 4.83k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.82k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.83k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.83k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.83k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 4.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     12|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     12|    }                                                                          \
  |  |  |  |   56|  4.83k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.82k|    break;
  |  |  ------------------
  |  |   61|  4.37M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.37M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.37M, False: 80.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.37M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 4.37M]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.37M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.37M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.37M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.37M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 4.37M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  4.37M|    ptr += n;                                                                  \
  |  |  |  |   57|  4.37M|    break;
  |  |  ------------------
  |  |   62|  4.37M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  44.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 44.2k, False: 4.41M]
  |  |  |  |  ------------------
  |  |  |  |   50|  44.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 44.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  44.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  44.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  44.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  44.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 44.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  44.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  44.2k|    break;
  |  |  ------------------
  |  |   63|  44.2k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 3, False: 4.45M]
  |  |  ------------------
  |  |   64|      4|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 4.45M]
  |  |  ------------------
  |  |   65|      6|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 4.45M]
  |  |  ------------------
  |  |   66|      6|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      6|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  2.93k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 2.93k, False: 4.45M]
  ------------------
  157|  2.93k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.93k|#  define MINBPC(enc) 1
  ------------------
  158|  2.93k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.93k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.93k|    {                                                                          \
  |  |  |  |  135|  2.93k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.93k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.93k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 2.92k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  2.93k|    }
  |  |  ------------------
  ------------------
  159|  2.92k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  2.92k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.92k, False: 1.00k]
  |  |  ------------------
  ------------------
  160|  1.92k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.92k|#  define MINBPC(enc) 1
  ------------------
  161|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.92k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.92k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.92k|    }
  |  |  ------------------
  ------------------
  162|  1.92k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.92k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 24, False: 1.89k]
  ------------------
  163|     24|            *nextTokPtr = ptr;
  164|     24|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  165|     24|          }
  166|  1.89k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.89k|#  define MINBPC(enc) 1
  ------------------
  167|  1.89k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.89k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.92k|        }
  169|  1.00k|        break;
  170|  28.7k|      default:
  ------------------
  |  Branch (170:7): [True: 28.7k, False: 4.42M]
  ------------------
  171|  28.7k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  28.7k|#  define MINBPC(enc) 1
  ------------------
  172|  28.7k|        break;
  173|  4.45M|      }
  174|  4.45M|    }
  175|  2.07k|  }
  176|    127|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    127|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  2.09k|}
xmltok.c:normal_scanPi:
  277|  8.30k|               const char **nextTokPtr) {
  278|  8.30k|  int tok;
  279|  8.30k|  const char *target = ptr;
  280|  8.30k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.30k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.30k|    {                                                                          \
  |  |  |  |  135|  8.30k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  8.30k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 8.29k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  8.30k|    }
  |  |  ------------------
  ------------------
  281|  8.29k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.29k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.29k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  5.86k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  7.56k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 8.29k]
  |  |  ------------------
  |  |  111|  7.56k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  7.56k|    /* fall through */                                                         \
  |  |  116|  7.56k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.42k, False: 3.86k]
  |  |  ------------------
  |  |  117|  7.56k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.14k, False: 5.15k]
  |  |  ------------------
  |  |  118|  7.56k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  7.56k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  7.56k|    break;                                                                     \
  |  |  120|  7.56k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    405|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 411, False: 7.88k]
  |  |  |  |  ------------------
  |  |  |  |  100|    411|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 410]
  |  |  |  |  ------------------
  |  |  |  |  101|    405|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    410|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    820|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    410|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 407]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    407|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    407|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 405]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    410|    ptr += n;                                                                  \
  |  |  |  |  107|    405|    break;
  |  |  ------------------
  |  |  121|    405|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    292|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 301, False: 7.99k]
  |  |  |  |  ------------------
  |  |  |  |  100|    301|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 299]
  |  |  |  |  ------------------
  |  |  |  |  101|    292|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    299|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    598|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    299|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 296]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    296|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    296|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 292]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    299|    ptr += n;                                                                  \
  |  |  |  |  107|    292|    break;
  |  |  ------------------
  |  |  122|    292|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9, False: 8.28k]
  |  |  |  |  ------------------
  |  |  |  |  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: 4, 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|      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|      4|  default:
  ------------------
  |  Branch (283:3): [True: 4, False: 8.29k]
  ------------------
  284|      4|    *nextTokPtr = ptr;
  285|      4|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  286|  8.29k|  }
  287|  1.28M|  while (HAS_CHAR(enc, ptr, end)) {
  288|  1.28M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.28M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.28M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  4.92M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.26M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.28M]
  |  |  ------------------
  |  |   82|  1.26M|    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.26M|    /* fall through */                                                         \
  |  |   87|  1.26M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.19M, False: 89.5k]
  |  |  ------------------
  |  |   88|  1.19M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 8.76k, False: 1.27M]
  |  |  ------------------
  |  |   89|  1.25M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 58.2k, False: 1.22M]
  |  |  ------------------
  |  |   90|  1.25M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 244, False: 1.28M]
  |  |  ------------------
  |  |   91|  1.26M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 4.15k, False: 1.27M]
  |  |  ------------------
  |  |   92|  1.26M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.26M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.26M|    break;                                                                     \
  |  |   94|  1.26M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    687|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 699, False: 1.27M]
  |  |  |  |  ------------------
  |  |  |  |   71|    699|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 697]
  |  |  |  |  ------------------
  |  |  |  |   72|    687|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    697|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.39k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    697|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 688]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    688|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    688|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 687]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|    697|    ptr += n;                                                                  \
  |  |  |  |   78|    687|    break;
  |  |  ------------------
  |  |   95|  9.31k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  9.28k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9.31k, False: 1.27M]
  |  |  |  |  ------------------
  |  |  |  |   71|  9.31k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 9.30k]
  |  |  |  |  ------------------
  |  |  |  |   72|  9.28k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  9.30k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  18.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.30k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 9.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  9.30k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.30k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 18, False: 9.28k]
  |  |  |  |  ------------------
  |  |  |  |   74|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|  9.30k|    ptr += n;                                                                  \
  |  |  |  |   78|  9.28k|    break;
  |  |  ------------------
  |  |   96|  9.28k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 27, False: 1.28M]
  |  |  |  |  ------------------
  |  |  |  |   71|     27|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 25]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     25|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     50|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     25|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     18|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     18|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     25|    }                                                                          \
  |  |  |  |   77|     25|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  2.00k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 2.00k, False: 1.27M]
  ------------------
  291|  2.59k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 588, False: 1.27M]
  ------------------
  292|  4.25k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.65k, False: 1.27M]
  ------------------
  293|  4.25k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  4.25k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 3, False: 4.24k]
  ------------------
  294|      3|        *nextTokPtr = ptr;
  295|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  296|      3|      }
  297|  4.24k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.24k|#  define MINBPC(enc) 1
  ------------------
  298|  6.47M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  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)])
  |  |  ------------------
  ------------------
  300|  12.6M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  7.75k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.74k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.75k, False: 6.47M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.75k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 7.75k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.74k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.75k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.75k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.75k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 7.74k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  7.75k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.74k|    break;
  |  |  ------------------
  |  |   61|  6.30M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.30M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.30M, False: 173k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.30M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 6.30M]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.30M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.30M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.30M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.30M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 6.30M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  6.30M|    ptr += n;                                                                  \
  |  |  |  |   57|  6.30M|    break;
  |  |  ------------------
  |  |   62|  6.30M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  32.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 32.2k, False: 6.44M]
  |  |  |  |  ------------------
  |  |  |  |   50|  32.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 32.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  32.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  32.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  32.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  32.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 32.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  32.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  32.2k|    break;
  |  |  ------------------
  |  |   63|  32.2k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 6, False: 6.47M]
  |  |  ------------------
  |  |   64|      8|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 6.47M]
  |  |  ------------------
  |  |   65|      9|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 1, False: 6.47M]
  |  |  ------------------
  |  |   66|      9|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      9|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  5.80k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 5.80k, False: 6.47M]
  ------------------
  302|  5.80k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.80k|#  define MINBPC(enc) 1
  ------------------
  303|  5.80k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.80k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.80k|    {                                                                          \
  |  |  |  |  135|  5.80k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.80k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.80k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 5.79k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  5.80k|    }
  |  |  ------------------
  ------------------
  304|  5.79k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  5.79k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 4.07k, False: 1.72k]
  |  |  ------------------
  ------------------
  305|  4.07k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.07k|#  define MINBPC(enc) 1
  ------------------
  306|  4.07k|            return tok;
  307|  4.07k|          }
  308|  1.72k|          break;
  309|   127k|        default:
  ------------------
  |  Branch (309:9): [True: 127k, False: 6.35M]
  ------------------
  310|   127k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   127k|#  define MINBPC(enc) 1
  ------------------
  311|   127k|          break;
  312|  6.47M|        }
  313|  6.47M|      }
  314|    140|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    140|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.87k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.87k, False: 1.27M]
  ------------------
  316|  3.87k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.87k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 3.87k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  3.87k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.87k|#  define MINBPC(enc) 1
  ------------------
  321|  3.87k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.87k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.87k|    {                                                                          \
  |  |  |  |  135|  3.87k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.87k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.87k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 3.84k]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|  3.87k|    }
  |  |  ------------------
  ------------------
  322|  3.84k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.84k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.82k, False: 23]
  |  |  ------------------
  ------------------
  323|  3.82k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.82k|#  define MINBPC(enc) 1
  ------------------
  324|  3.82k|        return tok;
  325|  3.82k|      }
  326|       |      /* fall through */
  327|     26|    default:
  ------------------
  |  Branch (327:5): [True: 3, False: 1.28M]
  ------------------
  328|     26|      *nextTokPtr = ptr;
  329|     26|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  330|  1.28M|    }
  331|  1.28M|  }
  332|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  8.26k|}
xmltok.c:normal_checkPiTarget:
  232|  8.12k|                      int *tokPtr) {
  233|  8.12k|  int upper = 0;
  234|  8.12k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.12k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  8.12k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  8.12k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  8.12k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  8.12k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 5.00k, False: 3.12k]
  ------------------
  237|  5.00k|    return 1;
  238|  3.12k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  3.12k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|  1.30k|  case ASCII_x:
  ------------------
  |  |   86|  1.30k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.30k, False: 1.81k]
  ------------------
  240|  1.30k|    break;
  241|    658|  case ASCII_X:
  ------------------
  |  |   59|    658|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 658, False: 2.46k]
  ------------------
  242|    658|    upper = 1;
  243|    658|    break;
  244|  1.15k|  default:
  ------------------
  |  Branch (244:3): [True: 1.15k, False: 1.96k]
  ------------------
  245|  1.15k|    return 1;
  246|  3.12k|  }
  247|  1.96k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.96k|#  define MINBPC(enc) 1
  ------------------
  248|  1.96k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.96k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    780|  case ASCII_m:
  ------------------
  |  |   75|    780|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 780, False: 1.18k]
  ------------------
  250|    780|    break;
  251|    590|  case ASCII_M:
  ------------------
  |  |   48|    590|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 590, False: 1.37k]
  ------------------
  252|    590|    upper = 1;
  253|    590|    break;
  254|    591|  default:
  ------------------
  |  Branch (254:3): [True: 591, False: 1.37k]
  ------------------
  255|    591|    return 1;
  256|  1.96k|  }
  257|  1.37k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.37k|#  define MINBPC(enc) 1
  ------------------
  258|  1.37k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.37k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    245|  case ASCII_l:
  ------------------
  |  |   74|    245|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 245, False: 1.12k]
  ------------------
  260|    245|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.36k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.12k|  default:
  ------------------
  |  Branch (264:3): [True: 1.12k, False: 247]
  ------------------
  265|  1.12k|    return 1;
  266|  1.37k|  }
  267|    247|  if (upper)
  ------------------
  |  Branch (267:7): [True: 5, False: 242]
  ------------------
  268|      5|    return 0;
  269|    242|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    242|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    242|  return 1;
  271|    247|}
xmltok.c:normal_scanPercent:
  924|  4.42k|                    const char **nextTokPtr) {
  925|  4.42k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.42k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.42k|    {                                                                          \
  |  |  |  |  135|  4.42k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.42k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.42k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 4.41k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  4.42k|    }
  |  |  ------------------
  ------------------
  926|  4.41k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.41k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.41k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  2.23k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.14k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 4.41k]
  |  |  ------------------
  |  |  111|  1.14k|    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.14k|    /* fall through */                                                         \
  |  |  116|  1.14k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 413, False: 3.99k]
  |  |  ------------------
  |  |  117|  1.14k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 736, False: 3.67k]
  |  |  ------------------
  |  |  118|  1.14k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.14k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.14k|    break;                                                                     \
  |  |  120|  1.14k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    678|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 696, False: 3.71k]
  |  |  |  |  ------------------
  |  |  |  |  100|    696|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 695]
  |  |  |  |  ------------------
  |  |  |  |  101|    678|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    695|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.39k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    695|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 679]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    679|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    679|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 678]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|    695|    ptr += n;                                                                  \
  |  |  |  |  107|    678|    break;
  |  |  ------------------
  |  |  121|    678|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    195|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 200, False: 4.21k]
  |  |  |  |  ------------------
  |  |  |  |  100|    200|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 199]
  |  |  |  |  ------------------
  |  |  |  |  101|    195|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    199|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    398|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    199|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 197]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    197|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    197|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 195]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|    199|    ptr += n;                                                                  \
  |  |  |  |  107|    195|    break;
  |  |  ------------------
  |  |  122|    195|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 4.39k]
  |  |  |  |  ------------------
  |  |  |  |  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: 14, 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|     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;
  |  |  ------------------
  ------------------
  928|    974|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 974, False: 3.43k]
  ------------------
  929|  1.31k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 343, False: 4.06k]
  ------------------
  930|  2.34k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 1.02k, False: 3.38k]
  ------------------
  931|  2.34k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 4.40k]
  ------------------
  932|  2.34k|    *nextTokPtr = ptr;
  933|  2.34k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  2.34k|#define XML_TOK_PERCENT 22
  ------------------
  934|      3|  default:
  ------------------
  |  Branch (934:3): [True: 3, False: 4.40k]
  ------------------
  935|      3|    *nextTokPtr = ptr;
  936|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  937|  4.41k|  }
  938|  7.42k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  7.42k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  7.42k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.42k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  12.9k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  4.51k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 7.42k]
  |  |  ------------------
  |  |   82|  4.51k|    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|  4.51k|    /* fall through */                                                         \
  |  |   87|  4.51k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.45k, False: 5.97k]
  |  |  ------------------
  |  |   88|  2.78k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.33k, False: 6.09k]
  |  |  ------------------
  |  |   89|  3.19k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 413, False: 7.00k]
  |  |  ------------------
  |  |   90|  3.45k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 258, False: 7.16k]
  |  |  ------------------
  |  |   91|  4.51k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 1.05k, False: 6.36k]
  |  |  ------------------
  |  |   92|  4.51k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  4.51k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  4.51k|    break;                                                                     \
  |  |   94|  4.51k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    659|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 674, False: 6.74k]
  |  |  |  |  ------------------
  |  |  |  |   71|    674|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 673]
  |  |  |  |  ------------------
  |  |  |  |   72|    659|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    673|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.34k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    673|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 662]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    662|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    662|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 659]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|    673|    ptr += n;                                                                  \
  |  |  |  |   78|    659|    break;
  |  |  ------------------
  |  |   95|    659|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    319|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 328, False: 7.09k]
  |  |  |  |  ------------------
  |  |  |  |   71|    328|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 326]
  |  |  |  |  ------------------
  |  |  |  |   72|    319|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    326|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    652|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    326|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 320]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    320|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    320|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 319]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    326|    ptr += n;                                                                  \
  |  |  |  |   78|    319|    break;
  |  |  ------------------
  |  |   96|    319|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 7.40k]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 13]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      2|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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;
  |  |  ------------------
  ------------------
  941|  1.88k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.88k, False: 5.54k]
  ------------------
  942|  1.88k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.88k|#  define MINBPC(enc) 1
  ------------------
  943|  1.88k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.88k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     14|    default:
  ------------------
  |  Branch (944:5): [True: 14, False: 7.40k]
  ------------------
  945|     14|      *nextTokPtr = ptr;
  946|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  947|  7.42k|    }
  948|  7.42k|  }
  949|     90|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     90|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  2.02k|}
xmltok.c:normal_scanPoundName:
  954|  7.37k|                      const char **nextTokPtr) {
  955|  7.37k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.37k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.37k|    {                                                                          \
  |  |  |  |  135|  7.37k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.37k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.37k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 7.37k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  7.37k|    }
  |  |  ------------------
  ------------------
  956|  7.37k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  7.37k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.37k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  7.09k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  7.31k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 7.37k]
  |  |  ------------------
  |  |  111|  7.31k|    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|  7.31k|    /* fall through */                                                         \
  |  |  116|  7.31k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 6.99k, False: 383]
  |  |  ------------------
  |  |  117|  7.31k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 328, False: 7.04k]
  |  |  ------------------
  |  |  118|  7.31k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  7.31k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  7.31k|    break;                                                                     \
  |  |  120|  7.31k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      9|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 26, False: 7.34k]
  |  |  |  |  ------------------
  |  |  |  |  100|     26|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 25]
  |  |  |  |  ------------------
  |  |  |  |  101|      9|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     50|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     25|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     12|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 9]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     25|    ptr += n;                                                                  \
  |  |  |  |  107|      9|    break;
  |  |  ------------------
  |  |  121|     10|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      3|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10, False: 7.36k]
  |  |  |  |  ------------------
  |  |  |  |  100|     10|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     16|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      6|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|      8|    ptr += n;                                                                  \
  |  |  |  |  107|      3|    break;
  |  |  ------------------
  |  |  122|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 7.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     32|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     16|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      1|  default:
  ------------------
  |  Branch (958:3): [True: 1, False: 7.37k]
  ------------------
  959|      1|    *nextTokPtr = ptr;
  960|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  961|  7.37k|  }
  962|  48.3k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  48.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  48.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  48.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   136k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  40.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 48.3k]
  |  |  ------------------
  |  |   82|  40.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  40.6k|    /* fall through */                                                         \
  |  |   87|  40.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 14.9k, False: 33.3k]
  |  |  ------------------
  |  |   88|  39.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 24.8k, False: 23.4k]
  |  |  ------------------
  |  |   89|  40.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 292, False: 48.0k]
  |  |  ------------------
  |  |   90|  40.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 255, False: 48.0k]
  |  |  ------------------
  |  |   91|  40.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 288, False: 48.0k]
  |  |  ------------------
  |  |   92|  40.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  40.6k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  40.6k|    break;                                                                     \
  |  |   94|  40.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    209|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 230, False: 48.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|    230|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 228]
  |  |  |  |  ------------------
  |  |  |  |   72|    209|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    228|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    456|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    228|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 17, False: 211]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    211|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    211|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 209]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|    228|    ptr += n;                                                                  \
  |  |  |  |   78|    209|    break;
  |  |  ------------------
  |  |   95|    235|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    205|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 235, False: 48.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|    235|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 231]
  |  |  |  |  ------------------
  |  |  |  |   72|    205|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    231|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    462|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    231|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 19, False: 212]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    212|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    212|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 7, False: 205]
  |  |  |  |  ------------------
  |  |  |  |   74|     26|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     26|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     26|    }                                                                          \
  |  |  |  |   77|    231|    ptr += n;                                                                  \
  |  |  |  |   78|    205|    break;
  |  |  ------------------
  |  |   96|    205|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 48.2k]
  |  |  |  |  ------------------
  |  |  |  |   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: 17, 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|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    906|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 906, False: 47.3k]
  ------------------
  966|  3.51k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 2.60k, False: 45.6k]
  ------------------
  967|  5.88k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 2.36k, False: 45.9k]
  ------------------
  968|  6.16k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 280, False: 48.0k]
  ------------------
  969|  7.04k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 883, False: 47.4k]
  ------------------
  970|  7.04k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 2, False: 48.3k]
  ------------------
  971|  7.17k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 126, False: 48.1k]
  ------------------
  972|  7.17k|      *nextTokPtr = ptr;
  973|  7.17k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  7.17k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     12|    default:
  ------------------
  |  Branch (974:5): [True: 12, False: 48.2k]
  ------------------
  975|     12|      *nextTokPtr = ptr;
  976|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  977|  48.3k|    }
  978|  48.3k|  }
  979|     74|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     74|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  7.33k|}
xmltok.c:normal_contentTok:
  824|  4.88M|                   const char **nextTokPtr) {
  825|  4.88M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 159k, False: 4.72M]
  ------------------
  826|   159k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   159k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  4.72M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  4.72M|#  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|  4.72M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.72M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.72M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  2.66M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 2.66M, False: 2.05M]
  ------------------
  838|  2.66M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.66M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.66M|#  define MINBPC(enc) 1
  ------------------
  839|   168k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 168k, False: 4.55M]
  ------------------
  840|   168k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   168k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   168k|#  define MINBPC(enc) 1
  ------------------
  841|  1.33k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 1.33k, False: 4.72M]
  ------------------
  842|  1.33k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.33k|#  define MINBPC(enc) 1
  ------------------
  843|  1.33k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.33k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.33k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.33k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 18, False: 1.31k]
  ------------------
  844|     18|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     18|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  1.31k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.31k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.31k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 372, False: 940]
  ------------------
  846|    372|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    372|#  define MINBPC(enc) 1
  ------------------
  847|  1.31k|    *nextTokPtr = ptr;
  848|  1.31k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.31k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  1.15M|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 1.15M, False: 3.57M]
  ------------------
  850|  1.15M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.15M|#  define MINBPC(enc) 1
  ------------------
  851|  1.15M|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.15M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  10.2k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 10.2k, False: 4.71M]
  ------------------
  853|  10.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.2k|#  define MINBPC(enc) 1
  ------------------
  854|  10.2k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  10.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  10.2k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 524, False: 9.73k]
  ------------------
  855|    524|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    524|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  9.73k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  9.73k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 7.01k, False: 2.71k]
  ------------------
  857|  7.01k|      break;
  858|  2.71k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.71k|#  define MINBPC(enc) 1
  ------------------
  859|  2.71k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.71k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.71k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  2.71k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 224, False: 2.49k]
  ------------------
  860|    224|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    224|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  2.49k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  2.49k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 2.49k, False: 1]
  ------------------
  862|  2.49k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  2.49k|#  define MINBPC(enc) 1
  ------------------
  863|  2.49k|      break;
  864|  2.49k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  31.1k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.37k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.35k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.37k, False: 4.72M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.37k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 8, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.35k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      8|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.36k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.36k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.36k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 2.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     12|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     12|    }                                                                          \
  |  |  |  |   56|  2.36k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.35k|    break;
  |  |  ------------------
  |  |   61|  6.19k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.17k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.19k, False: 4.72M]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.19k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 8, False: 6.18k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.17k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      8|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.18k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.18k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.18k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 6.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     13|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     13|    }                                                                          \
  |  |  |  |   56|  6.18k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.17k|    break;
  |  |  ------------------
  |  |   62|  6.93k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.91k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.93k, False: 4.72M]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.93k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 6.93k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.91k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.93k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.93k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.93k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 23, False: 6.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     23|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     23|    }                                                                          \
  |  |  |  |   56|  6.93k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.91k|    break;
  |  |  ------------------
  |  |   63|  6.91k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 52, False: 4.72M]
  |  |  ------------------
  |  |   64|     59|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 7, False: 4.72M]
  |  |  ------------------
  |  |   65|     78|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 19, False: 4.72M]
  |  |  ------------------
  |  |   66|     78|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     78|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     78|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|   710k|  default:
  ------------------
  |  Branch (868:3): [True: 710k, False: 4.01M]
  ------------------
  869|   710k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   710k|#  define MINBPC(enc) 1
  ------------------
  870|   710k|    break;
  871|  4.72M|  }
  872|  83.3M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  83.3M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  83.3M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  83.3M|  (((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|  23.6k|      LEAD_CASE(2)
  ------------------
  |  |  875|  23.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 23.6k, False: 83.3M]
  |  |  ------------------
  |  |  876|  23.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  23.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  23.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 10, False: 23.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 5, False: 23.6k]
  |  |  ------------------
  |  |  877|     15|      *nextTokPtr = ptr;                                                       \
  |  |  878|     15|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     15|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     15|    }                                                                          \
  |  |  880|  23.6k|    ptr += n;                                                                  \
  |  |  881|  23.6k|    break;
  ------------------
  883|  3.43M|      LEAD_CASE(3)
  ------------------
  |  |  875|  3.43M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 3.43M, False: 79.9M]
  |  |  ------------------
  |  |  876|  3.43M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  3.43M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.43M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 12, False: 3.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 4, False: 3.43M]
  |  |  ------------------
  |  |  877|     16|      *nextTokPtr = ptr;                                                       \
  |  |  878|     16|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     16|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     16|    }                                                                          \
  |  |  880|  3.43M|    ptr += n;                                                                  \
  |  |  881|  3.43M|    break;
  ------------------
  884|   131k|      LEAD_CASE(4)
  ------------------
  |  |  875|   131k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 131k, False: 83.2M]
  |  |  ------------------
  |  |  876|   131k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|   131k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   131k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 21, False: 131k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 3, False: 131k]
  |  |  ------------------
  |  |  877|     24|      *nextTokPtr = ptr;                                                       \
  |  |  878|     24|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     24|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     24|    }                                                                          \
  |  |  880|   131k|    ptr += n;                                                                  \
  |  |  881|   131k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|   178k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 178k, False: 83.1M]
  ------------------
  887|   178k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|   178k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|   178k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 178k, False: 494]
  |  |  ------------------
  ------------------
  888|   178k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|   178k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 159k, False: 18.8k]
  ------------------
  889|   159k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   159k|#  define MINBPC(enc) 1
  ------------------
  890|   159k|          break;
  891|   159k|        }
  892|  18.8k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  18.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  18.8k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 18.6k, False: 223]
  |  |  ------------------
  ------------------
  893|  18.6k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  18.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 18.6k, False: 5]
  ------------------
  894|  18.6k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  18.6k|#  define MINBPC(enc) 1
  ------------------
  895|  18.6k|            break;
  896|  18.6k|          }
  897|      5|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      5|#  define MINBPC(enc) 1
  ------------------
  898|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  899|  18.6k|        }
  900|  18.8k|      }
  901|       |      /* fall through */
  902|  51.5k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 50.8k, False: 83.3M]
  ------------------
  903|   193k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 141k, False: 83.2M]
  ------------------
  904|   193k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 36, False: 83.3M]
  ------------------
  905|   193k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 4, False: 83.3M]
  ------------------
  906|   193k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 9, False: 83.3M]
  ------------------
  907|   193k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 458, False: 83.3M]
  ------------------
  908|   592k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 399k, False: 82.9M]
  ------------------
  909|   592k|      *nextTokPtr = ptr;
  910|   592k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   592k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  79.0M|    default:
  ------------------
  |  Branch (911:5): [True: 79.0M, False: 4.36M]
  ------------------
  912|  79.0M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  79.0M|#  define MINBPC(enc) 1
  ------------------
  913|  79.0M|      break;
  914|  83.3M|    }
  915|  83.3M|  }
  916|   142k|  *nextTokPtr = ptr;
  917|   142k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   142k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|   735k|}
xmltok.c:normal_scanLt:
  726|  2.66M|               const char **nextTokPtr) {
  727|  2.66M|#  ifdef XML_NS
  728|  2.66M|  int hadColon;
  729|  2.66M|#  endif
  730|  2.66M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.66M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.66M|    {                                                                          \
  |  |  |  |  135|  2.66M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.66M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.66M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 2.66M]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|  2.66M|    }
  |  |  ------------------
  ------------------
  731|  2.66M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.66M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.66M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  2.63M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.63M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.66M]
  |  |  ------------------
  |  |  111|  2.63M|    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.63M|    /* fall through */                                                         \
  |  |  116|  2.63M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.62M, False: 42.4k]
  |  |  ------------------
  |  |  117|  2.63M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 10.0k, False: 2.65M]
  |  |  ------------------
  |  |  118|  2.63M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.63M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.63M|    break;                                                                     \
  |  |  120|  2.63M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.13k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.13k, False: 2.66M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.13k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.13k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.13k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.27k|    (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: 3, False: 1.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.13k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.13k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|  1.13k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.13k|    break;
  |  |  ------------------
  |  |  121|  1.90k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.88k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.90k, False: 2.66M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.90k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.90k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.88k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.90k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.80k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.90k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 1.90k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.90k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.90k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 19, False: 1.88k]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|  1.90k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.88k|    break;
  |  |  ------------------
  |  |  122|  1.88k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 2.66M]
  |  |  |  |  ------------------
  |  |  |  |  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: 1, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      8|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 8, 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;
  |  |  ------------------
  ------------------
  733|  3.14k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 3.14k, False: 2.66M]
  ------------------
  734|  3.14k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.14k|#  define MINBPC(enc) 1
  ------------------
  735|  3.14k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.14k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.14k|    {                                                                          \
  |  |  |  |  135|  3.14k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.14k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.14k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 3.13k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  3.14k|    }
  |  |  ------------------
  ------------------
  736|  3.13k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.13k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.13k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 10, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|  1.03k|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 1.03k, False: 2.10k]
  ------------------
  738|  1.03k|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.03k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.03k|#  define MINBPC(enc) 1
  ------------------
  739|  2.09k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 2.09k, False: 1.04k]
  ------------------
  740|  2.09k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.09k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.09k|#  define MINBPC(enc) 1
  ------------------
  741|  3.13k|    }
  742|     10|    *nextTokPtr = ptr;
  743|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  744|  4.50k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 4.50k, False: 2.66M]
  ------------------
  745|  4.50k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.50k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.50k|#  define MINBPC(enc) 1
  ------------------
  746|  21.7k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 21.7k, False: 2.64M]
  ------------------
  747|  21.7k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  21.7k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  21.7k|#  define MINBPC(enc) 1
  ------------------
  748|     26|  default:
  ------------------
  |  Branch (748:3): [True: 26, False: 2.66M]
  ------------------
  749|     26|    *nextTokPtr = ptr;
  750|     26|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  751|  2.66M|  }
  752|  2.64M|#  ifdef XML_NS
  753|  2.64M|  hadColon = 0;
  754|  2.64M|#  endif
  755|       |  /* we have a start-tag */
  756|  2.76M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  2.76M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.76M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.76M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|   278k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   113k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.76M]
  |  |  ------------------
  |  |   82|   113k|    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|   113k|    /* fall through */                                                         \
  |  |   87|   113k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 42.4k, False: 2.72M]
  |  |  ------------------
  |  |   88|  55.1k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 12.6k, False: 2.75M]
  |  |  ------------------
  |  |   89|  80.9k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 25.7k, False: 2.73M]
  |  |  ------------------
  |  |   90|  81.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 573, False: 2.76M]
  |  |  ------------------
  |  |   91|   113k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 32.3k, False: 2.73M]
  |  |  ------------------
  |  |   92|   113k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   113k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   113k|    break;                                                                     \
  |  |   94|   113k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  2.39k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 2.40k, False: 2.76M]
  |  |  |  |  ------------------
  |  |  |  |   71|  2.40k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 2.39k]
  |  |  |  |  ------------------
  |  |  |  |   72|  2.39k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  2.39k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.79k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.39k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 2.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  2.39k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.39k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 2.39k]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|  2.39k|    ptr += n;                                                                  \
  |  |  |  |   78|  2.39k|    break;
  |  |  ------------------
  |  |   95|  6.93k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  6.90k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 6.93k, False: 2.75M]
  |  |  |  |  ------------------
  |  |  |  |   71|  6.93k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 6.93k]
  |  |  |  |  ------------------
  |  |  |  |   72|  6.90k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  6.93k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  13.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.93k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  6.92k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.92k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 20, False: 6.90k]
  |  |  |  |  ------------------
  |  |  |  |   74|     24|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     24|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     24|    }                                                                          \
  |  |  |  |   77|  6.93k|    ptr += n;                                                                  \
  |  |  |  |   78|  6.90k|    break;
  |  |  ------------------
  |  |   96|  6.90k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 2.76M]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     34|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     12|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 12, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 2.76M]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|      0|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  10.5k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 10.5k, False: 2.75M]
  ------------------
  777|  11.3k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 772, False: 2.76M]
  ------------------
  778|  14.4k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 3.05k, False: 2.76M]
  ------------------
  779|  14.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  14.4k|#  define MINBPC(enc) 1
  ------------------
  780|  19.5k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  19.5k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  19.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  19.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  8.97k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  7.33k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 19.5k]
  |  |  ------------------
  |  |  111|  7.33k|    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|  7.33k|    /* fall through */                                                         \
  |  |  116|  7.33k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.01k, False: 14.4k]
  |  |  ------------------
  |  |  117|  7.33k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.32k, False: 17.1k]
  |  |  ------------------
  |  |  118|  7.33k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  7.33k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  7.33k|    break;                                                                     \
  |  |  120|  7.33k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.38k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.39k, False: 18.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.39k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.39k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.38k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.39k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.79k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.39k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 1.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.38k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.38k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 1.38k]
  |  |  |  |  ------------------
  |  |  |  |  103|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|  1.39k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.38k|    break;
  |  |  ------------------
  |  |  121|  1.38k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    551|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 564, False: 18.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|    564|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 562]
  |  |  |  |  ------------------
  |  |  |  |  101|    551|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    562|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.12k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    562|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 556]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    556|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    556|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 551]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|    562|    ptr += n;                                                                  \
  |  |  |  |  107|    551|    break;
  |  |  ------------------
  |  |  122|    551|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 19.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     34|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, 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|     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|  1.12k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.12k, False: 18.3k]
  ------------------
  784|  1.12k|          goto gt;
  785|  3.94k|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 3.94k, False: 15.5k]
  ------------------
  786|  3.94k|          goto sol;
  787|    748|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 748, False: 18.7k]
  ------------------
  788|  1.23k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 489, False: 19.0k]
  ------------------
  789|  5.11k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 3.88k, False: 15.6k]
  ------------------
  790|  5.11k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.11k|#  define MINBPC(enc) 1
  ------------------
  791|  5.11k|          continue;
  792|      6|        default:
  ------------------
  |  Branch (792:9): [True: 6, False: 19.5k]
  ------------------
  793|      6|          *nextTokPtr = ptr;
  794|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  795|  19.5k|        }
  796|  9.27k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  9.27k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  19.5k|      }
  798|     39|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  14.4k|    }
  800|  2.62M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 2.62M, False: 139k]
  ------------------
  801|  2.62M|    gt:
  802|  2.62M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.62M|#  define MINBPC(enc) 1
  ------------------
  803|  2.62M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  2.62M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  1.53k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 1.53k, False: 2.76M]
  ------------------
  805|  5.48k|    sol:
  806|  5.48k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.48k|#  define MINBPC(enc) 1
  ------------------
  807|  5.48k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.48k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.48k|    {                                                                          \
  |  |  |  |  135|  5.48k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.48k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.48k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 5.47k]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|  5.48k|    }
  |  |  ------------------
  ------------------
  808|  5.47k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  5.47k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 16, False: 5.45k]
  ------------------
  809|     16|        *nextTokPtr = ptr;
  810|     16|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  811|     16|      }
  812|  5.45k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.45k|#  define MINBPC(enc) 1
  ------------------
  813|  5.45k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  5.45k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     25|    default:
  ------------------
  |  Branch (814:5): [True: 25, False: 2.76M]
  ------------------
  815|     25|      *nextTokPtr = ptr;
  816|     25|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  817|  2.76M|    }
  818|  2.76M|  }
  819|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  2.64M|}
xmltok.c:normal_scanCdataSection:
  337|  2.09k|                         const char **nextTokPtr) {
  338|  2.09k|  static const char CDATA_LSQB[]
  339|  2.09k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  2.09k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  2.09k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  2.09k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  2.09k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  2.09k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  2.09k|#define ASCII_LSQB 0x5B
  ------------------
  340|  2.09k|  int i;
  341|  2.09k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.09k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  2.09k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  2.09k|    {                                                                          \
  |  |  135|  2.09k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  2.09k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  2.09k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 2.09k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  2.09k|    }
  ------------------
  344|  14.6k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  12.5k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 12.5k, False: 2.08k]
  ------------------
  345|  12.5k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|  12.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 10, False: 12.5k]
  ------------------
  346|     10|      *nextTokPtr = ptr;
  347|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  348|     10|    }
  349|  12.5k|  }
  350|  2.08k|  *nextTokPtr = ptr;
  351|  2.08k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  2.08k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  2.09k|}
xmltok.c:normal_scanEndTag:
  432|  21.7k|                   const char **nextTokPtr) {
  433|  21.7k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  21.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  21.7k|    {                                                                          \
  |  |  |  |  135|  21.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  21.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  21.7k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 21.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  21.7k|    }
  |  |  ------------------
  ------------------
  434|  21.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  21.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  21.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  22.0k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  21.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 21.7k]
  |  |  ------------------
  |  |  111|  21.0k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  21.0k|    /* fall through */                                                         \
  |  |  116|  21.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 20.7k, False: 978]
  |  |  ------------------
  |  |  117|  21.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 330, False: 21.4k]
  |  |  ------------------
  |  |  118|  21.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  21.0k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  21.0k|    break;                                                                     \
  |  |  120|  21.0k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    344|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 352, False: 21.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|    352|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 351]
  |  |  |  |  ------------------
  |  |  |  |  101|    344|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    351|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    702|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    351|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 346]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    346|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    346|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 344]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    351|    ptr += n;                                                                  \
  |  |  |  |  107|    344|    break;
  |  |  ------------------
  |  |  121|    344|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    283|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 288, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|    288|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 287]
  |  |  |  |  ------------------
  |  |  |  |  101|    283|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    287|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    574|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    287|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 286]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    286|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    286|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 283]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|    287|    ptr += n;                                                                  \
  |  |  |  |  107|    283|    break;
  |  |  ------------------
  |  |  122|    283|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 7, False: 21.7k]
  |  |  |  |  ------------------
  |  |  |  |  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: 4, 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|      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: 21.7k]
  ------------------
  437|      1|    *nextTokPtr = ptr;
  438|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  439|  21.7k|  }
  440|  1.06M|  while (HAS_CHAR(enc, ptr, end)) {
  441|  1.06M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.06M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.06M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  3.69M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.01M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.06M]
  |  |  ------------------
  |  |   82|  1.01M|    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.01M|    /* fall through */                                                         \
  |  |   87|  1.01M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 589k, False: 476k]
  |  |  ------------------
  |  |   88|  1.01M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 427k, False: 638k]
  |  |  ------------------
  |  |   89|  1.01M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 561, False: 1.06M]
  |  |  ------------------
  |  |   90|  1.01M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 210, False: 1.06M]
  |  |  ------------------
  |  |   91|  1.01M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 246, False: 1.06M]
  |  |  ------------------
  |  |   92|  1.01M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.01M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.01M|    break;                                                                     \
  |  |   94|  1.01M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    325|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 331, False: 1.06M]
  |  |  |  |  ------------------
  |  |  |  |   71|    331|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 330]
  |  |  |  |  ------------------
  |  |  |  |   72|    325|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    330|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    660|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    330|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 328]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    328|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    328|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 325]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|    330|    ptr += n;                                                                  \
  |  |  |  |   78|    325|    break;
  |  |  ------------------
  |  |   95|  25.7k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  25.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 25.7k, False: 1.04M]
  |  |  |  |  ------------------
  |  |  |  |   71|  25.7k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 25.7k]
  |  |  |  |  ------------------
  |  |  |  |   72|  25.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  25.7k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  51.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  25.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 25.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  25.7k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  25.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 40, False: 25.6k]
  |  |  |  |  ------------------
  |  |  |  |   74|     42|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     42|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     42|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     42|    }                                                                          \
  |  |  |  |   77|  25.7k|    ptr += n;                                                                  \
  |  |  |  |   78|  25.6k|    break;
  |  |  ------------------
  |  |   96|  25.6k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 41, False: 1.06M]
  |  |  |  |  ------------------
  |  |  |  |   71|     41|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 40]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     40|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     80|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     40|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     38|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     38|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 38, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     40|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     40|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     40|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     40|    }                                                                          \
  |  |  |  |   77|     40|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    671|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 671, False: 1.06M]
  ------------------
  444|  2.88k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 2.21k, False: 1.06M]
  ------------------
  445|  19.1k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 16.2k, False: 1.04M]
  ------------------
  446|  38.4k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  19.1k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  19.3k|#  define MINBPC(enc) 1
  ------------------
  447|  38.4k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  38.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  38.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    477|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 477, False: 37.9k]
  ------------------
  449|  3.23k|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 2.75k, False: 35.6k]
  ------------------
  450|  19.3k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 16.0k, False: 22.3k]
  ------------------
  451|  19.3k|          break;
  452|  19.0k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 19.0k, False: 19.3k]
  ------------------
  453|  19.0k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  19.0k|#  define MINBPC(enc) 1
  ------------------
  454|  19.0k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  19.0k|#define XML_TOK_END_TAG 5
  ------------------
  455|      8|        default:
  ------------------
  |  Branch (455:9): [True: 8, False: 38.4k]
  ------------------
  456|      8|          *nextTokPtr = ptr;
  457|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  458|  38.4k|        }
  459|  38.4k|      }
  460|     38|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 1.06M]
  ------------------
  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.41k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 2.41k, False: 1.06M]
  ------------------
  469|  2.41k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.41k|#  define MINBPC(enc) 1
  ------------------
  470|  2.41k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  2.41k|#define XML_TOK_END_TAG 5
  ------------------
  471|      3|    default:
  ------------------
  |  Branch (471:5): [True: 3, False: 1.06M]
  ------------------
  472|      3|      *nextTokPtr = ptr;
  473|      3|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  474|  1.06M|    }
  475|  1.06M|  }
  476|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  21.7k|}
xmltok.c:normal_scanAtts:
  573|  9.27k|                 const char **nextTokPtr) {
  574|  9.27k|#  ifdef XML_NS
  575|  9.27k|  int hadColon = 0;
  576|  9.27k|#  endif
  577|  6.46M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  6.46M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.46M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.46M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  14.0M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.30M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 6.46M]
  |  |  ------------------
  |  |   82|  3.30M|    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.30M|    /* fall through */                                                         \
  |  |   87|  3.30M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.09M, False: 3.36M]
  |  |  ------------------
  |  |   88|  3.20M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 112k, False: 6.35M]
  |  |  ------------------
  |  |   89|  3.24M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 42.6k, False: 6.42M]
  |  |  ------------------
  |  |   90|  3.25M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 1.11k, False: 6.46M]
  |  |  ------------------
  |  |   91|  3.30M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 54.2k, False: 6.40M]
  |  |  ------------------
  |  |   92|  3.30M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.30M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  3.30M|    break;                                                                     \
  |  |   94|  3.30M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   320k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 320k, False: 6.14M]
  |  |  |  |  ------------------
  |  |  |  |   71|   320k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 320k]
  |  |  |  |  ------------------
  |  |  |  |   72|   320k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   320k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   641k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   320k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 320k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   320k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   320k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 320k]
  |  |  |  |  ------------------
  |  |  |  |   74|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      2|    }                                                                          \
  |  |  |  |   77|   320k|    ptr += n;                                                                  \
  |  |  |  |   78|   320k|    break;
  |  |  ------------------
  |  |   95|   320k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   304k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 304k, False: 6.15M]
  |  |  |  |  ------------------
  |  |  |  |   71|   304k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 304k]
  |  |  |  |  ------------------
  |  |  |  |   72|   304k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   304k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   609k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   304k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 304k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   304k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   304k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 15, False: 304k]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|   304k|    ptr += n;                                                                  \
  |  |  |  |   78|   304k|    break;
  |  |  ------------------
  |  |   96|   304k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 25, False: 6.46M]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 6.46M]
  ------------------
  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|  11.3k|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 11.3k, False: 6.45M]
  ------------------
  598|  11.7k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 380, False: 6.46M]
  ------------------
  599|  12.4k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 779, False: 6.46M]
  ------------------
  600|  13.1k|      for (;;) {
  601|  13.1k|        int t;
  602|       |
  603|  13.1k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  13.1k|#  define MINBPC(enc) 1
  ------------------
  604|  13.1k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.1k|    {                                                                          \
  |  |  |  |  135|  13.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  13.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 39, False: 13.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     39|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     39|      }                                                                        \
  |  |  |  |  138|  13.1k|    }
  |  |  ------------------
  ------------------
  605|  13.0k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  13.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  13.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  13.0k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 12.4k, False: 648]
  ------------------
  607|  12.4k|          break;
  608|    648|        switch (t) {
  609|    196|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 196, False: 452]
  ------------------
  610|    390|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 194, False: 454]
  ------------------
  611|    641|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 251, False: 397]
  ------------------
  612|    641|          break;
  613|      7|        default:
  ------------------
  |  Branch (613:9): [True: 7, False: 641]
  ------------------
  614|      7|          *nextTokPtr = ptr;
  615|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  616|    648|        }
  617|    648|      }
  618|       |      /* fall through */
  619|  2.53M|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 2.52M, False: 3.94M]
  ------------------
  620|  2.53M|      int open;
  621|  2.53M|#  ifdef XML_NS
  622|  2.53M|      hadColon = 0;
  623|  2.53M|#  endif
  624|  2.53M|      for (;;) {
  625|  2.53M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.53M|#  define MINBPC(enc) 1
  ------------------
  626|  2.53M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.53M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.53M|    {                                                                          \
  |  |  |  |  135|  2.53M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.53M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.53M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 2.53M]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|  2.53M|    }
  |  |  ------------------
  ------------------
  627|  2.53M|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  2.53M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.53M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|  2.53M|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 111k, False: 2.42M]
  |  Branch (628:32): [True: 2.42M, False: 903]
  ------------------
  629|  2.53M|          break;
  630|    903|        switch (open) {
  631|    264|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 264, False: 639]
  ------------------
  632|    643|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 379, False: 524]
  ------------------
  633|    891|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 248, False: 655]
  ------------------
  634|    891|          break;
  635|     12|        default:
  ------------------
  |  Branch (635:9): [True: 12, False: 891]
  ------------------
  636|     12|          *nextTokPtr = ptr;
  637|     12|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  638|    903|        }
  639|    903|      }
  640|  2.53M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.53M|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  9.25M|      for (;;) {
  643|  9.25M|        int t;
  644|  9.25M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.25M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.25M|    {                                                                          \
  |  |  |  |  135|  9.25M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.25M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  9.25M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 70, False: 9.25M]
  |  |  |  |  ------------------
  |  |  |  |  136|     70|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     70|      }                                                                        \
  |  |  |  |  138|  9.25M|    }
  |  |  ------------------
  ------------------
  645|  9.25M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  9.25M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  9.25M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  9.25M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 2.53M, False: 6.72M]
  ------------------
  647|  2.53M|          break;
  648|  6.72M|        switch (t) {
  649|  7.90M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  6.99k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.98k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.99k, False: 6.71M]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.99k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 6.99k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.98k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.99k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.99k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.99k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 6.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  6.99k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.98k|    break;
  |  |  ------------------
  |  |   61|  3.93M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.93M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.93M, False: 2.78M]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.93M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 3.93M]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.93M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.93M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.93M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.93M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 3.93M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  3.93M|    ptr += n;                                                                  \
  |  |  |  |   57|  3.93M|    break;
  |  |  ------------------
  |  |   62|  3.93M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  13.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 13.4k, False: 6.70M]
  |  |  |  |  ------------------
  |  |  |  |   50|  13.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 13.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  13.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  13.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  13.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  13.4k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 13.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  13.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  13.4k|    break;
  |  |  ------------------
  |  |   63|  13.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 2, False: 6.72M]
  |  |  ------------------
  |  |   64|      4|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 6.72M]
  |  |  ------------------
  |  |   65|      6|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 6.72M]
  |  |  ------------------
  |  |   66|      6|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      6|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  36.9k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 36.9k, False: 6.68M]
  ------------------
  651|  36.9k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  36.9k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  36.9k|#  define MINBPC(enc) 1
  ------------------
  652|  36.9k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 12, False: 36.9k]
  ------------------
  653|     12|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 10, False: 2]
  ------------------
  654|     10|              *nextTokPtr = ptr;
  655|     12|            return tok;
  656|     12|          }
  657|  36.9k|          break;
  658|  36.9k|        }
  659|  36.9k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 74, False: 6.72M]
  ------------------
  660|     74|          *nextTokPtr = ptr;
  661|     74|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     74|#define XML_TOK_INVALID 0
  ------------------
  662|  2.73M|        default:
  ------------------
  |  Branch (662:9): [True: 2.73M, False: 3.98M]
  ------------------
  663|  2.73M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.73M|#  define MINBPC(enc) 1
  ------------------
  664|  2.73M|          break;
  665|  6.72M|        }
  666|  6.72M|      }
  667|  2.53M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.53M|#  define MINBPC(enc) 1
  ------------------
  668|  2.53M|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.53M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.53M|    {                                                                          \
  |  |  |  |  135|  2.53M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.53M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.53M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 2.53M]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  2.53M|    }
  |  |  ------------------
  ------------------
  669|  2.53M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.53M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.53M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|  10.5k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 10.5k, False: 2.52M]
  ------------------
  671|  2.50M|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.48M, False: 43.2k]
  ------------------
  672|  2.52M|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 25.2k, False: 2.50M]
  ------------------
  673|  2.52M|        break;
  674|  3.32k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 3.32k, False: 2.52M]
  ------------------
  675|  3.32k|        goto sol;
  676|  4.13k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 4.13k, False: 2.52M]
  ------------------
  677|  4.13k|        goto gt;
  678|     48|      default:
  ------------------
  |  Branch (678:7): [True: 48, False: 2.53M]
  ------------------
  679|     48|        *nextTokPtr = ptr;
  680|     48|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     48|#define XML_TOK_INVALID 0
  ------------------
  681|  2.53M|      }
  682|       |      /* ptr points to closing quote */
  683|  2.90M|      for (;;) {
  684|  2.90M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.90M|#  define MINBPC(enc) 1
  ------------------
  685|  2.90M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.90M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.90M|    {                                                                          \
  |  |  |  |  135|  2.90M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.90M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.90M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 39, False: 2.90M]
  |  |  |  |  ------------------
  |  |  |  |  136|     39|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     39|      }                                                                        \
  |  |  |  |  138|  2.90M|    }
  |  |  ------------------
  ------------------
  686|  2.90M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.90M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.90M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|  2.79M|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.22M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.90M]
  |  |  ------------------
  |  |  111|  2.22M|    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.22M|    /* fall through */                                                         \
  |  |  116|  2.22M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.19M, False: 709k]
  |  |  ------------------
  |  |  117|  2.22M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 28.3k, False: 2.87M]
  |  |  ------------------
  |  |  118|  2.22M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.22M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.22M|    break;                                                                     \
  |  |  120|  2.22M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|   291k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 291k, False: 2.61M]
  |  |  |  |  ------------------
  |  |  |  |  100|   291k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 291k]
  |  |  |  |  ------------------
  |  |  |  |  101|   291k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|   291k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   583k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   291k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 291k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|   291k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   291k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 291k]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|   291k|    ptr += n;                                                                  \
  |  |  |  |  107|   291k|    break;
  |  |  ------------------
  |  |  121|   291k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  7.42k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 7.43k, False: 2.89M]
  |  |  |  |  ------------------
  |  |  |  |  100|  7.43k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 7.43k]
  |  |  |  |  ------------------
  |  |  |  |  101|  7.42k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  7.43k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  14.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.43k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 7.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  7.43k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.43k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 7.42k]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|  7.43k|    ptr += n;                                                                  \
  |  |  |  |  107|  7.42k|    break;
  |  |  ------------------
  |  |  122|  7.42k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 2.90M]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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: 9, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      6|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    516|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 516, False: 2.90M]
  ------------------
  689|   380k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 379k, False: 2.52M]
  ------------------
  690|   380k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 379, False: 2.90M]
  ------------------
  691|   380k|          continue;
  692|    468|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 468, False: 2.90M]
  ------------------
  693|  4.60k|        gt:
  694|  4.60k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.60k|#  define MINBPC(enc) 1
  ------------------
  695|  4.60k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  4.60k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    795|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 795, False: 2.90M]
  ------------------
  697|  4.12k|        sol:
  698|  4.12k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.12k|#  define MINBPC(enc) 1
  ------------------
  699|  4.12k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.12k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.12k|    {                                                                          \
  |  |  |  |  135|  4.12k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.12k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.12k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 4.11k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  4.12k|    }
  |  |  ------------------
  ------------------
  700|  4.11k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  4.11k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 7, False: 4.10k]
  ------------------
  701|      7|            *nextTokPtr = ptr;
  702|      7|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  703|      7|          }
  704|  4.10k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.10k|#  define MINBPC(enc) 1
  ------------------
  705|  4.10k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  4.10k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      4|        default:
  ------------------
  |  Branch (706:9): [True: 4, False: 2.90M]
  ------------------
  707|      4|          *nextTokPtr = ptr;
  708|      4|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  709|  2.90M|        }
  710|  2.52M|        break;
  711|  2.90M|      }
  712|  2.52M|      break;
  713|  2.52M|    }
  714|  2.52M|    default:
  ------------------
  |  Branch (714:5): [True: 13, False: 6.46M]
  ------------------
  715|     13|      *nextTokPtr = ptr;
  716|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  717|  6.46M|    }
  718|  6.46M|  }
  719|     90|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     90|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  9.27k|}
xmltok.c:normal_scanRef:
  545|  1.80M|                const char **nextTokPtr) {
  546|  1.80M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.80M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.80M|    {                                                                          \
  |  |  |  |  135|  1.80M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.80M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.80M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 1.80M]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|  1.80M|    }
  |  |  ------------------
  ------------------
  547|  1.80M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.80M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.80M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|  1.72M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.78M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 1.80M]
  |  |  ------------------
  |  |  111|  1.78M|    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.78M|    /* fall through */                                                         \
  |  |  116|  1.78M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.71M, False: 81.5k]
  |  |  ------------------
  |  |  117|  1.78M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 69.0k, False: 1.73M]
  |  |  ------------------
  |  |  118|  1.78M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.78M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.78M|    break;                                                                     \
  |  |  120|  1.78M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    239|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 247, False: 1.80M]
  |  |  |  |  ------------------
  |  |  |  |  100|    247|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 246]
  |  |  |  |  ------------------
  |  |  |  |  101|    239|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    246|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    492|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    246|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 242]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    242|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    242|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 239]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    246|    ptr += n;                                                                  \
  |  |  |  |  107|    239|    break;
  |  |  ------------------
  |  |  121|    739|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    733|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 739, False: 1.79M]
  |  |  |  |  ------------------
  |  |  |  |  100|    739|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 3, False: 736]
  |  |  |  |  ------------------
  |  |  |  |  101|    733|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    736|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.47k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    736|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 734]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    734|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    734|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 733]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    736|    ptr += n;                                                                  \
  |  |  |  |  107|    733|    break;
  |  |  ------------------
  |  |  122|    733|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 1.80M]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  11.5k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 11.5k, False: 1.78M]
  ------------------
  550|  11.5k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  11.5k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  11.5k|#  define MINBPC(enc) 1
  ------------------
  551|     10|  default:
  ------------------
  |  Branch (551:3): [True: 10, False: 1.80M]
  ------------------
  552|     10|    *nextTokPtr = ptr;
  553|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  554|  1.80M|  }
  555|  5.19M|  while (HAS_CHAR(enc, ptr, end)) {
  556|  5.19M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.19M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.19M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|  13.5M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.40M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 5.19M]
  |  |  ------------------
  |  |   82|  3.40M|    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.40M|    /* fall through */                                                         \
  |  |   87|  3.40M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.39M, False: 1.80M]
  |  |  ------------------
  |  |   88|  3.39M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.44k, False: 5.19M]
  |  |  ------------------
  |  |   89|  3.40M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 9.51k, False: 5.18M]
  |  |  ------------------
  |  |   90|  3.40M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 917, False: 5.19M]
  |  |  ------------------
  |  |   91|  3.40M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 908, False: 5.19M]
  |  |  ------------------
  |  |   92|  3.40M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.40M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  3.40M|    break;                                                                     \
  |  |   94|  3.40M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    372|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 380, False: 5.19M]
  |  |  |  |  ------------------
  |  |  |  |   71|    380|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 379]
  |  |  |  |  ------------------
  |  |  |  |   72|    372|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    379|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    758|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    379|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 373]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    373|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    373|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 372]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    379|    ptr += n;                                                                  \
  |  |  |  |   78|    372|    break;
  |  |  ------------------
  |  |   95|    480|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    468|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 480, False: 5.19M]
  |  |  |  |  ------------------
  |  |  |  |   71|    480|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 479]
  |  |  |  |  ------------------
  |  |  |  |   72|    468|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    479|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    958|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    479|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 471]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    471|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    471|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 468]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    479|    ptr += n;                                                                  \
  |  |  |  |   78|    468|    break;
  |  |  ------------------
  |  |   96|    468|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 5.19M]
  |  |  |  |  ------------------
  |  |  |  |   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: 16, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      2|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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|  1.78M|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 1.78M, False: 3.40M]
  ------------------
  559|  1.78M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.78M|#  define MINBPC(enc) 1
  ------------------
  560|  1.78M|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  1.78M|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     18|    default:
  ------------------
  |  Branch (561:5): [True: 18, False: 5.19M]
  ------------------
  562|     18|      *nextTokPtr = ptr;
  563|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  564|  5.19M|    }
  565|  5.19M|  }
  566|     43|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  1.78M|}
xmltok.c:normal_scanCharRef:
  514|  11.5k|                    const char **nextTokPtr) {
  515|  11.5k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  11.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  11.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  11.5k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 11.5k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  11.5k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  11.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 8.39k, False: 3.16k]
  |  |  ------------------
  ------------------
  517|  8.39k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  8.39k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  8.39k|#  define MINBPC(enc) 1
  ------------------
  518|  3.16k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.16k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  3.14k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 3.14k, False: 19]
  ------------------
  520|  3.14k|      break;
  521|     19|    default:
  ------------------
  |  Branch (521:5): [True: 19, False: 3.14k]
  ------------------
  522|     19|      *nextTokPtr = ptr;
  523|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  524|  3.16k|    }
  525|  6.98k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.14k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.84k|#  define MINBPC(enc) 1
  ------------------
  526|  6.98k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.98k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  3.84k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.84k, False: 3.13k]
  ------------------
  528|  3.84k|        break;
  529|  3.12k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 3.12k, False: 3.85k]
  ------------------
  530|  3.12k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.12k|#  define MINBPC(enc) 1
  ------------------
  531|  3.12k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  3.12k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     12|      default:
  ------------------
  |  Branch (532:7): [True: 12, False: 6.97k]
  ------------------
  533|     12|        *nextTokPtr = ptr;
  534|     12|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  535|  6.98k|      }
  536|  6.98k|    }
  537|  3.14k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  11.5k|}
xmltok.c:normal_scanHexCharRef:
  483|  8.39k|                       const char **nextTokPtr) {
  484|  8.39k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  8.39k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  8.39k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 8.39k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  8.39k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.39k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.39k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  1.31k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 1.31k, False: 7.08k]
  ------------------
  487|  8.39k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 7.07k, False: 1.32k]
  ------------------
  488|  8.39k|      break;
  489|      7|    default:
  ------------------
  |  Branch (489:5): [True: 7, False: 8.39k]
  ------------------
  490|      7|      *nextTokPtr = ptr;
  491|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  492|  8.39k|    }
  493|  27.7k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  8.39k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  19.3k|#  define MINBPC(enc) 1
  ------------------
  494|  27.7k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  27.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  27.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  4.56k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 4.56k, False: 23.1k]
  ------------------
  496|  19.3k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 14.8k, False: 12.9k]
  ------------------
  497|  19.3k|        break;
  498|  8.36k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 8.36k, False: 19.3k]
  ------------------
  499|  8.36k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  8.36k|#  define MINBPC(enc) 1
  ------------------
  500|  8.36k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  8.36k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     13|      default:
  ------------------
  |  Branch (501:7): [True: 13, False: 27.7k]
  ------------------
  502|     13|        *nextTokPtr = ptr;
  503|     13|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  504|  27.7k|      }
  505|  27.7k|    }
  506|  8.39k|  }
  507|     12|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  8.39k|}
xmltok.c:normal_cdataSectionTok:
  356|   161k|                        const char **nextTokPtr) {
  357|   161k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 163, False: 161k]
  ------------------
  358|    163|    return XML_TOK_NONE;
  ------------------
  |  |   51|    163|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|   161k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|   161k|#  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|   161k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   161k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   161k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  42.0k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 42.0k, False: 119k]
  ------------------
  370|  42.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  42.0k|#  define MINBPC(enc) 1
  ------------------
  371|  42.0k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  42.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  42.0k|    {                                                                          \
  |  |  |  |  135|  42.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  42.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  42.0k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 42.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  42.0k|    }
  |  |  ------------------
  ------------------
  372|  42.0k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  42.0k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 29.9k, False: 12.0k]
  ------------------
  373|  29.9k|      break;
  374|  12.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  12.0k|#  define MINBPC(enc) 1
  ------------------
  375|  12.0k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.0k|    {                                                                          \
  |  |  |  |  135|  12.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  12.0k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 12.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  12.0k|    }
  |  |  ------------------
  ------------------
  376|  12.0k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  12.0k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 10.2k, False: 1.84k]
  ------------------
  377|  10.2k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  10.2k|#  define MINBPC(enc) 1
  ------------------
  378|  10.2k|      break;
  379|  10.2k|    }
  380|  1.84k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.84k|#  define MINBPC(enc) 1
  ------------------
  381|  1.84k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  1.84k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  36.2k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 36.2k, False: 125k]
  ------------------
  383|  36.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  36.2k|#  define MINBPC(enc) 1
  ------------------
  384|  36.2k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  36.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  36.2k|    {                                                                          \
  |  |  |  |  135|  36.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  36.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  36.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 36.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  36.2k|    }
  |  |  ------------------
  ------------------
  385|  36.2k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  36.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  36.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 2.92k, False: 33.2k]
  ------------------
  386|  2.92k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.92k|#  define MINBPC(enc) 1
  ------------------
  387|  36.2k|    *nextTokPtr = ptr;
  388|  36.2k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  36.2k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  48.6k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 48.6k, False: 112k]
  ------------------
  390|  48.6k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  48.6k|#  define MINBPC(enc) 1
  ------------------
  391|  48.6k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  48.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  48.6k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  3.29k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.28k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.29k, False: 158k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.29k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 3.29k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.28k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.29k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.29k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.29k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 3.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  3.29k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.28k|    break;
  |  |  ------------------
  |  |   61|  6.81k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.79k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.81k, False: 154k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.81k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 6.80k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.79k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.80k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.80k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.80k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 6.79k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  6.80k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.79k|    break;
  |  |  ------------------
  |  |   62|  9.72k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  9.71k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 9.72k, False: 151k]
  |  |  |  |  ------------------
  |  |  |  |   50|  9.72k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 9.72k]
  |  |  |  |  ------------------
  |  |  |  |   51|  9.71k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  9.72k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  9.72k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.72k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 9.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  9.72k|    ptr += n;                                                                  \
  |  |  |  |   57|  9.71k|    break;
  |  |  ------------------
  |  |   63|  9.71k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 161k]
  |  |  ------------------
  |  |   64|     19|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 5, False: 161k]
  |  |  ------------------
  |  |   65|     28|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 161k]
  |  |  ------------------
  |  |   66|     28|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     28|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  14.6k|  default:
  ------------------
  |  Branch (393:3): [True: 14.6k, False: 146k]
  ------------------
  394|  14.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  14.6k|#  define MINBPC(enc) 1
  ------------------
  395|  14.6k|    break;
  396|   161k|  }
  397|  14.0M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  14.0M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  14.0M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  14.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|   127k|      LEAD_CASE(2)
  ------------------
  |  |  400|   127k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 127k, False: 13.9M]
  |  |  ------------------
  |  |  401|   127k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|   127k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   127k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 3, False: 127k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 5, False: 127k]
  |  |  ------------------
  |  |  402|      8|      *nextTokPtr = ptr;                                                       \
  |  |  403|      8|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      8|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      8|    }                                                                          \
  |  |  405|   127k|    ptr += n;                                                                  \
  |  |  406|   127k|    break;
  ------------------
  408|  12.0M|      LEAD_CASE(3)
  ------------------
  |  |  400|  12.0M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 12.0M, False: 2.00M]
  |  |  ------------------
  |  |  401|  12.0M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  12.0M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  12.0M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 12.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 4, False: 12.0M]
  |  |  ------------------
  |  |  402|      8|      *nextTokPtr = ptr;                                                       \
  |  |  403|      8|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      8|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      8|    }                                                                          \
  |  |  405|  12.0M|    ptr += n;                                                                  \
  |  |  406|  12.0M|    break;
  ------------------
  409|  1.39M|      LEAD_CASE(4)
  ------------------
  |  |  400|  1.39M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 1.39M, False: 12.6M]
  |  |  ------------------
  |  |  401|  1.39M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  1.39M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.39M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 1, False: 1.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 1.39M]
  |  |  ------------------
  |  |  402|      2|      *nextTokPtr = ptr;                                                       \
  |  |  403|      2|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      2|    }                                                                          \
  |  |  405|  1.39M|    ptr += n;                                                                  \
  |  |  406|  1.39M|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|      9|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 9, False: 14.0M]
  ------------------
  412|     13|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 4, False: 14.0M]
  ------------------
  413|     19|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 6, False: 14.0M]
  ------------------
  414|  2.00k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 1.98k, False: 14.0M]
  ------------------
  415|  39.6k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 37.6k, False: 14.0M]
  ------------------
  416|  74.4k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 34.8k, False: 14.0M]
  ------------------
  417|  74.4k|      *nextTokPtr = ptr;
  418|  74.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  74.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   406k|    default:
  ------------------
  |  Branch (419:5): [True: 406k, False: 13.6M]
  ------------------
  420|   406k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   406k|#  define MINBPC(enc) 1
  ------------------
  421|   406k|      break;
  422|  14.0M|    }
  423|  14.0M|  }
  424|    133|  *nextTokPtr = ptr;
  425|    133|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    133|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  74.5k|}
xmltok.c:normal_attributeValueTok:
 1262|  53.8M|                          const char **nextTokPtr) {
 1263|  53.8M|  const char *start;
 1264|  53.8M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 646k, False: 53.2M]
  ------------------
 1265|   646k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   646k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  53.2M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  53.2M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  53.2M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  53.2M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 53.2M]
  ------------------
 1267|       |    /* This line cannot be executed.  The incoming data has already
 1268|       |     * been tokenized once, so incomplete characters like this have
 1269|       |     * already been eliminated from the input.  Retaining the paranoia
 1270|       |     * check is still valuable, however.
 1271|       |     */
 1272|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1273|      0|  }
 1274|  53.2M|  start = ptr;
 1275|  1.17G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.17G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.17G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.17G|  (((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|  11.2M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  11.2M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 11.2M, False: 1.16G]
  |  |  ------------------
  |  | 1279|  11.2M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  11.2M|    break;
  ------------------
 1282|   754M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   754M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 754M, False: 417M]
  |  |  ------------------
  |  | 1279|   754M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   754M|    break;
  ------------------
 1283|  64.2M|      LEAD_CASE(4)
  ------------------
  |  | 1278|  64.2M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 64.2M, False: 1.10G]
  |  |  ------------------
  |  | 1279|  64.2M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  64.2M|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  2.77M|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 2.77M, False: 1.16G]
  ------------------
 1286|  2.77M|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 1.57M, False: 1.19M]
  ------------------
 1287|  1.57M|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.57M|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.57M|#  define MINBPC(enc) 1
  ------------------
 1288|  1.19M|      *nextTokPtr = ptr;
 1289|  1.19M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.19M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      4|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 4, False: 1.17G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      4|      *nextTokPtr = ptr;
 1293|      4|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
 1294|  42.5M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 42.5M, False: 1.12G]
  ------------------
 1295|  42.5M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 28.3M, False: 14.2M]
  ------------------
 1296|  28.3M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  28.3M|#  define MINBPC(enc) 1
  ------------------
 1297|  28.3M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  28.3M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  28.3M|      }
 1299|  14.2M|      *nextTokPtr = ptr;
 1300|  14.2M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  14.2M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  1.07M|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 1.07M, False: 1.17G]
  ------------------
 1302|  1.07M|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 952k, False: 121k]
  ------------------
 1303|   952k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   952k|#  define MINBPC(enc) 1
  ------------------
 1304|   952k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   952k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   952k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   952k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 958, False: 951k]
  ------------------
 1305|    958|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    958|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|   951k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   951k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   951k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 677k, False: 274k]
  ------------------
 1307|   677k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   677k|#  define MINBPC(enc) 1
  ------------------
 1308|   951k|        *nextTokPtr = ptr;
 1309|   951k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   951k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|   952k|      }
 1311|   121k|      *nextTokPtr = ptr;
 1312|   121k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   121k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  6.20M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 6.20M, False: 1.16G]
  ------------------
 1314|  6.20M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 3.20M, False: 3.00M]
  ------------------
 1315|  3.20M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.20M|#  define MINBPC(enc) 1
  ------------------
 1316|  3.20M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  3.20M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  3.20M|      }
 1318|  3.00M|      *nextTokPtr = ptr;
 1319|  3.00M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.00M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   289M|    default:
  ------------------
  |  Branch (1320:5): [True: 289M, False: 882M]
  ------------------
 1321|   289M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   289M|#  define MINBPC(enc) 1
  ------------------
 1322|   289M|      break;
 1323|  1.17G|    }
 1324|  1.17G|  }
 1325|   595k|  *nextTokPtr = ptr;
 1326|   595k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   595k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  53.2M|}
xmltok.c:normal_entityValueTok:
 1331|  1.06M|                       const char **nextTokPtr) {
 1332|  1.06M|  const char *start;
 1333|  1.06M|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 3.42k, False: 1.06M]
  ------------------
 1334|  3.42k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.42k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  1.06M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.06M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.06M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.06M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 1.06M]
  ------------------
 1336|       |    /* This line cannot be executed.  The incoming data has already
 1337|       |     * been tokenized once, so incomplete characters like this have
 1338|       |     * already been eliminated from the input.  Retaining the paranoia
 1339|       |     * check is still valuable, however.
 1340|       |     */
 1341|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1342|      0|  }
 1343|  1.06M|  start = ptr;
 1344|  9.12M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  9.12M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  9.12M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  9.12M|  (((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|  1.06k|      LEAD_CASE(2)
  ------------------
  |  | 1347|  1.06k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 1.06k, False: 9.12M]
  |  |  ------------------
  |  | 1348|  1.06k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  1.06k|    break;
  ------------------
 1351|  3.76k|      LEAD_CASE(3)
  ------------------
  |  | 1347|  3.76k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 3.76k, False: 9.11M]
  |  |  ------------------
  |  | 1348|  3.76k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  3.76k|    break;
  ------------------
 1352|  3.42k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  3.42k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 3.42k, False: 9.11M]
  |  |  ------------------
  |  | 1348|  3.42k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  3.42k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  21.1k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 21.1k, False: 9.10M]
  ------------------
 1355|  21.1k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 15.8k, False: 5.30k]
  ------------------
 1356|  15.8k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  15.8k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  15.8k|#  define MINBPC(enc) 1
  ------------------
 1357|  5.30k|      *nextTokPtr = ptr;
 1358|  5.30k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.30k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      6|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 6, False: 9.12M]
  ------------------
 1360|      6|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 1]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|      5|#define PREFIX(ident) normal_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|      5|#  define MINBPC(enc) 1
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 2, False: 3]
  ------------------
 1363|      5|      }
 1364|      1|      *nextTokPtr = ptr;
 1365|      1|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      1|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  51.3k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 51.3k, False: 9.07M]
  ------------------
 1367|  51.3k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 33.0k, False: 18.2k]
  ------------------
 1368|  33.0k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  33.0k|#  define MINBPC(enc) 1
  ------------------
 1369|  33.0k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  33.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  33.0k|      }
 1371|  18.2k|      *nextTokPtr = ptr;
 1372|  18.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  18.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   991k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 991k, False: 8.13M]
  ------------------
 1374|   991k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 959k, False: 32.3k]
  ------------------
 1375|   959k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   959k|#  define MINBPC(enc) 1
  ------------------
 1376|   959k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   959k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   959k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   959k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 233, False: 958k]
  ------------------
 1377|    233|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    233|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   958k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   958k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   958k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 16.2k, False: 942k]
  ------------------
 1379|  16.2k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  16.2k|#  define MINBPC(enc) 1
  ------------------
 1380|   958k|        *nextTokPtr = ptr;
 1381|   958k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   958k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   959k|      }
 1383|  32.3k|      *nextTokPtr = ptr;
 1384|  32.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  32.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  8.05M|    default:
  ------------------
  |  Branch (1385:5): [True: 8.05M, False: 1.07M]
  ------------------
 1386|  8.05M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  8.05M|#  define MINBPC(enc) 1
  ------------------
 1387|  8.05M|      break;
 1388|  9.12M|    }
 1389|  9.12M|  }
 1390|  1.36k|  *nextTokPtr = ptr;
 1391|  1.36k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.36k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  1.06M|}
xmltok.c:normal_nameMatchesAscii:
 1715|  98.1k|                         const char *end1, const char *ptr2) {
 1716|  98.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  98.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   399k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   301k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 354k, False: 45.2k]
  ------------------
 1718|   354k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   354k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 52, False: 354k]
  ------------------
 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|     52|      return 0; /* LCOV_EXCL_LINE */
 1725|     52|    }
 1726|   354k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   354k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 52.8k, False: 301k]
  ------------------
 1727|  52.8k|      return 0;
 1728|   354k|  }
 1729|  45.2k|  return ptr1 == end1;
 1730|  98.1k|}
xmltok.c:normal_nameLength:
 1733|  2.67M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  2.67M|  const char *start = ptr;
 1735|  6.50M|  for (;;) {
 1736|  6.50M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.50M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.50M|  (((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|  5.53k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  5.53k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 5.53k, False: 6.50M]
  |  |  ------------------
  |  | 1739|  5.53k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  5.53k|    break;
  ------------------
 1742|  27.9k|      LEAD_CASE(3)
  ------------------
  |  | 1738|  27.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 27.9k, False: 6.48M]
  |  |  ------------------
  |  | 1739|  27.9k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  27.9k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 6.50M]
  |  |  ------------------
  |  | 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.50M]
  ------------------
 1746|  3.28M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 3.28M, False: 3.22M]
  ------------------
 1747|  3.28M|#  ifdef XML_NS
 1748|  3.28M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 6.50M]
  ------------------
 1749|  3.28M|#  endif
 1750|  3.74M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 453k, False: 6.05M]
  ------------------
 1751|  3.76M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 27.3k, False: 6.48M]
  ------------------
 1752|  3.76M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 616, False: 6.50M]
  ------------------
 1753|  3.80M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 32.4k, False: 6.47M]
  ------------------
 1754|  3.80M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.80M|#  define MINBPC(enc) 1
  ------------------
 1755|  3.80M|      break;
 1756|  2.67M|    default:
  ------------------
  |  Branch (1756:5): [True: 2.67M, False: 3.83M]
  ------------------
 1757|  2.67M|      return (int)(ptr - start);
 1758|  6.50M|    }
 1759|  6.50M|  }
 1760|  2.67M|}
xmltok.c:normal_getAtts:
 1510|  2.63M|                ATTRIBUTE *atts) {
 1511|  2.63M|  enum { other, inName, inValue } state = inName;
 1512|  2.63M|  int nAtts = 0;
 1513|  2.63M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  44.0M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.63M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  41.4M|#  define MINBPC(enc) 1
  ------------------
 1517|  44.0M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  44.0M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  44.0M|  (((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|  1.23M|      LEAD_CASE(2)
  ------------------
  |  | 1527|  1.23M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 1.23M, False: 42.8M]
  |  |  ------------------
  |  | 1528|  1.23M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  1.23M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 582k, False: 647k]
  |  |  |  |  ------------------
  |  |  |  | 1520|   582k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 292k, False: 290k]
  |  |  |  |  ------------------
  |  |  |  | 1521|   292k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|   292k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|   292k|      }                                                                        \
  |  |  |  | 1524|   582k|      state = inName;                                                          \
  |  |  |  | 1525|   582k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  1.23M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  1.23M|    break;
  ------------------
 1531|  2.64M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  2.64M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 2.64M, False: 41.4M]
  |  |  ------------------
  |  | 1528|  2.64M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  2.64M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 13.9k, False: 2.63M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  13.9k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 7.75k, False: 6.15k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  7.75k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  7.75k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  7.75k|      }                                                                        \
  |  |  |  | 1524|  13.9k|      state = inName;                                                          \
  |  |  |  | 1525|  13.9k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  2.64M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  2.64M|    break;
  ------------------
 1532|  12.8k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  12.8k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 12.8k, False: 44.0M]
  |  |  ------------------
  |  | 1528|  12.8k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  12.8k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 12.8k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  12.8k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  12.8k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 44.0M]
  ------------------
 1535|  13.4M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 13.4M, False: 30.6M]
  ------------------
 1536|  14.0M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 573k, False: 43.4M]
  ------------------
 1537|  14.0M|      START_NAME
  ------------------
  |  | 1519|  14.0M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 4.43M, False: 9.59M]
  |  |  ------------------
  |  | 1520|  4.43M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 2.22M, False: 2.20M]
  |  |  ------------------
  |  | 1521|  2.22M|        atts[nAtts].name = ptr;                                                \
  |  | 1522|  2.22M|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|  2.22M|      }                                                                        \
  |  | 1524|  4.43M|      state = inName;                                                          \
  |  | 1525|  4.43M|    }
  ------------------
 1538|  14.0M|      break;
 1539|      0|#  undef START_NAME
 1540|   419k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 419k, False: 43.6M]
  ------------------
 1541|   419k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 209k, False: 210k]
  ------------------
 1542|   209k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 111k, False: 98.0k]
  ------------------
 1543|   111k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   111k|#  define MINBPC(enc) 1
  ------------------
 1544|   209k|        state = inValue;
 1545|   209k|        open = BT_QUOT;
 1546|   210k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 209k, False: 387]
  ------------------
 1547|   209k|        state = other;
 1548|   209k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 111k, False: 98.0k]
  ------------------
 1549|   111k|          atts[nAtts].valueEnd = ptr;
 1550|   209k|        nAtts++;
 1551|   209k|      }
 1552|   419k|      break;
 1553|  9.76M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 9.76M, False: 34.3M]
  ------------------
 1554|  9.76M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 4.82M, False: 4.93M]
  ------------------
 1555|  4.82M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 2.41M, False: 2.40M]
  ------------------
 1556|  2.41M|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.41M|#  define MINBPC(enc) 1
  ------------------
 1557|  4.82M|        state = inValue;
 1558|  4.82M|        open = BT_APOS;
 1559|  4.93M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 4.82M, False: 118k]
  ------------------
 1560|  4.82M|        state = other;
 1561|  4.82M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 2.41M, False: 2.40M]
  ------------------
 1562|  2.41M|          atts[nAtts].valueEnd = ptr;
 1563|  4.82M|        nAtts++;
 1564|  4.82M|      }
 1565|  9.76M|      break;
 1566|  37.0k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 37.0k, False: 44.0M]
  ------------------
 1567|  37.0k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 36.8k, False: 247]
  ------------------
 1568|  36.8k|        atts[nAtts].normalized = 0;
 1569|  37.0k|      break;
 1570|  59.8k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 59.8k, False: 44.0M]
  ------------------
 1571|  59.8k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 32.2k, False: 27.5k]
  ------------------
 1572|  32.2k|        state = other;
 1573|  27.5k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 8.65k, False: 18.9k]
  |  Branch (1573:36): [True: 8.11k, False: 541]
  |  Branch (1573:55): [True: 2.51k, False: 5.59k]
  ------------------
 1574|  27.5k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 1.07k, False: 1.43k]
  ------------------
 1575|  2.51k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  1.43k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  3.94k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 481, False: 955]
  ------------------
 1576|  2.51k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|    955|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  3.46k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 232, False: 723]
  ------------------
 1577|  2.51k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|    723|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|    723|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 288, False: 435]
  ------------------
 1578|  2.07k|        atts[nAtts].normalized = 0;
 1579|  59.8k|      break;
 1580|  6.67M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 6.67M, False: 37.3M]
  ------------------
 1581|  7.57M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 902k, False: 43.1M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  7.57M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 4.78k, False: 7.56M]
  ------------------
 1585|  4.78k|        state = other;
 1586|  7.56M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 1.80M, False: 5.76M]
  |  Branch (1586:36): [True: 1.80M, False: 814]
  ------------------
 1587|  1.80M|        atts[nAtts].normalized = 0;
 1588|  7.57M|      break;
 1589|  2.76M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 2.76M, False: 41.2M]
  ------------------
 1590|  2.84M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 77.3k, False: 43.9M]
  ------------------
 1591|  2.84M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 2.63M, False: 202k]
  ------------------
 1592|  2.63M|        return nAtts;
 1593|   202k|      break;
 1594|  5.44M|    default:
  ------------------
  |  Branch (1594:5): [True: 5.44M, False: 38.6M]
  ------------------
 1595|  5.44M|      break;
 1596|  44.0M|    }
 1597|  44.0M|  }
 1598|       |  /* not reached */
 1599|  2.63M|}
xmltok.c:normal_charRefNumber:
 1602|  10.3k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  10.3k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  10.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.3k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  10.3k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  10.3k|#  define MINBPC(enc) 1
  ------------------
 1607|  10.3k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  10.3k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 8.14k, False: 2.22k]
  |  |  ------------------
  ------------------
 1608|  34.8k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  8.14k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|  34.8k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 26.6k, False: 8.11k]
  ------------------
 1609|  26.6k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  26.6k|#  define MINBPC(enc) 1
  ------------------
 1610|  26.6k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  26.6k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|  26.6k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 26.6k]
  ------------------
 1612|    657|      case ASCII_0:
  ------------------
  |  |   90|    657|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 657, False: 26.0k]
  ------------------
 1613|  1.11k|      case ASCII_1:
  ------------------
  |  |   91|  1.11k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 454, False: 26.2k]
  ------------------
 1614|  1.77k|      case ASCII_2:
  ------------------
  |  |   92|  1.77k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 667, False: 26.0k]
  ------------------
 1615|  2.59k|      case ASCII_3:
  ------------------
  |  |   93|  2.59k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 815, False: 25.8k]
  ------------------
 1616|  3.02k|      case ASCII_4:
  ------------------
  |  |   94|  3.02k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 436, False: 26.2k]
  ------------------
 1617|  3.33k|      case ASCII_5:
  ------------------
  |  |   95|  3.33k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 302, False: 26.3k]
  ------------------
 1618|  3.78k|      case ASCII_6:
  ------------------
  |  |   96|  3.78k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 458, False: 26.2k]
  ------------------
 1619|  4.52k|      case ASCII_7:
  ------------------
  |  |   97|  4.52k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 738, False: 25.9k]
  ------------------
 1620|  5.04k|      case ASCII_8:
  ------------------
  |  |   98|  5.04k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 515, False: 26.1k]
  ------------------
 1621|  5.26k|      case ASCII_9:
  ------------------
  |  |   99|  5.26k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 225, False: 26.4k]
  ------------------
 1622|  5.26k|        result <<= 4;
 1623|  5.26k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  5.26k|#define ASCII_0 0x30
  ------------------
 1624|  5.26k|        break;
 1625|    382|      case ASCII_A:
  ------------------
  |  |   36|    382|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 382, False: 26.3k]
  ------------------
 1626|    855|      case ASCII_B:
  ------------------
  |  |   37|    855|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 473, False: 26.2k]
  ------------------
 1627|  9.57k|      case ASCII_C:
  ------------------
  |  |   38|  9.57k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 8.72k, False: 17.9k]
  ------------------
 1628|  16.4k|      case ASCII_D:
  ------------------
  |  |   39|  16.4k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 6.83k, False: 19.8k]
  ------------------
 1629|  17.3k|      case ASCII_E:
  ------------------
  |  |   40|  17.3k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 953, False: 25.7k]
  ------------------
 1630|  18.1k|      case ASCII_F:
  ------------------
  |  |   41|  18.1k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 827, False: 25.8k]
  ------------------
 1631|  18.1k|        result <<= 4;
 1632|  18.1k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  18.1k|#define ASCII_A 0x41
  ------------------
 1633|  18.1k|        break;
 1634|    384|      case ASCII_a:
  ------------------
  |  |   63|    384|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 384, False: 26.2k]
  ------------------
 1635|    653|      case ASCII_b:
  ------------------
  |  |   64|    653|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 269, False: 26.4k]
  ------------------
 1636|    876|      case ASCII_c:
  ------------------
  |  |   65|    876|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 223, False: 26.4k]
  ------------------
 1637|  1.74k|      case ASCII_d:
  ------------------
  |  |   66|  1.74k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 868, False: 25.8k]
  ------------------
 1638|  2.31k|      case ASCII_e:
  ------------------
  |  |   67|  2.31k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 570, False: 26.1k]
  ------------------
 1639|  3.22k|      case ASCII_f:
  ------------------
  |  |   68|  3.22k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 914, False: 25.7k]
  ------------------
 1640|  3.22k|        result <<= 4;
 1641|  3.22k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.22k|#define ASCII_a 0x61
  ------------------
 1642|  3.22k|        break;
 1643|  26.6k|      }
 1644|  26.6k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 25, False: 26.6k]
  ------------------
 1645|     25|        return -1;
 1646|  26.6k|    }
 1647|  8.14k|  } else {
 1648|  7.11k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  7.11k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  4.88k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 4.89k, False: 2.21k]
  ------------------
 1649|  4.89k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  4.89k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  4.89k|      result *= 10;
 1651|  4.89k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  4.89k|#define ASCII_0 0x30
  ------------------
 1652|  4.89k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 8, False: 4.88k]
  ------------------
 1653|      8|        return -1;
 1654|  4.89k|    }
 1655|  2.22k|  }
 1656|  10.3k|  return checkCharRefNumber(result);
 1657|  10.3k|}
xmltok.c:normal_predefinedEntityName:
 1661|  1.74M|                             const char *end) {
 1662|  1.74M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.74M|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  1.74M|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|  1.74M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 710k, False: 1.03M]
  ------------------
 1664|  5.29k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 5.29k, False: 1.74M]
  ------------------
 1665|  5.29k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  5.29k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.07k, False: 2.22k]
  |  |  ------------------
  ------------------
 1666|  3.07k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  3.07k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 16, False: 3.06k]
  |  |  ------------------
  ------------------
 1667|  2.36k|      case ASCII_l:
  ------------------
  |  |   74|  2.36k|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 2.36k, False: 715]
  ------------------
 1668|  2.36k|        return ASCII_LT;
  ------------------
  |  |  111|  2.36k|#define ASCII_LT 0x3C
  ------------------
 1669|    699|      case ASCII_g:
  ------------------
  |  |   69|    699|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 699, False: 2.37k]
  ------------------
 1670|    699|        return ASCII_GT;
  ------------------
  |  |  113|    699|#define ASCII_GT 0x3E
  ------------------
 1671|  3.07k|      }
 1672|  3.07k|    }
 1673|  2.23k|    break;
 1674|  2.23k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.40k, False: 1.74M]
  ------------------
 1675|  1.40k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.40k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 608, False: 792]
  |  |  ------------------
  ------------------
 1676|    608|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    608|#  define MINBPC(enc) 1
  ------------------
 1677|    608|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    608|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 399, False: 209]
  |  |  ------------------
  ------------------
 1678|    399|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    399|#  define MINBPC(enc) 1
  ------------------
 1679|    399|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    399|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 201, False: 198]
  |  |  ------------------
  ------------------
 1680|    201|          return ASCII_AMP;
  ------------------
  |  |  105|    201|#define ASCII_AMP 0x26
  ------------------
 1681|    399|      }
 1682|    608|    }
 1683|  1.19k|    break;
 1684|  1.02M|  case 4:
  ------------------
  |  Branch (1684:3): [True: 1.02M, False: 717k]
  ------------------
 1685|  1.02M|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.02M|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 250, False: 1.02M]
  |  |  ------------------
  ------------------
 1686|  1.02M|    case ASCII_q:
  ------------------
  |  |   79|  1.02M|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.02M, False: 1.28k]
  ------------------
 1687|  1.02M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.02M|#  define MINBPC(enc) 1
  ------------------
 1688|  1.02M|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|  1.02M|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.02M, False: 232]
  |  |  ------------------
  ------------------
 1689|  1.02M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.02M|#  define MINBPC(enc) 1
  ------------------
 1690|  1.02M|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|  1.02M|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.02M, False: 223]
  |  |  ------------------
  ------------------
 1691|  1.02M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.02M|#  define MINBPC(enc) 1
  ------------------
 1692|  1.02M|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|  1.02M|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.02M, False: 216]
  |  |  ------------------
  ------------------
 1693|  1.02M|            return ASCII_QUOT;
  ------------------
  |  |  104|  1.02M|#define ASCII_QUOT 0x22
  ------------------
 1694|  1.02M|        }
 1695|  1.02M|      }
 1696|    671|      break;
 1697|  1.03k|    case ASCII_a:
  ------------------
  |  |   63|  1.03k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.03k, False: 1.02M]
  ------------------
 1698|  1.03k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.03k|#  define MINBPC(enc) 1
  ------------------
 1699|  1.03k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|  1.03k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 817, False: 218]
  |  |  ------------------
  ------------------
 1700|    817|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    817|#  define MINBPC(enc) 1
  ------------------
 1701|    817|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    817|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 560, False: 257]
  |  |  ------------------
  ------------------
 1702|    560|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    560|#  define MINBPC(enc) 1
  ------------------
 1703|    560|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|    560|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 205, False: 355]
  |  |  ------------------
  ------------------
 1704|    205|            return ASCII_APOS;
  ------------------
  |  |  106|    205|#define ASCII_APOS 0x27
  ------------------
 1705|    560|        }
 1706|    817|      }
 1707|    830|      break;
 1708|  1.02M|    }
 1709|  1.74M|  }
 1710|   715k|  return 0;
 1711|  1.74M|}
xmltok.c:normal_updatePosition:
 1779|  4.63k|                       POSITION *pos) {
 1780|  3.61M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  3.61M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.61M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.61M|  (((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|  2.09k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  2.09k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 2.09k, False: 3.61M]
  |  |  ------------------
  |  | 1784|  2.09k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  2.09k|    pos->columnNumber++;                                                       \
  |  | 1786|  2.09k|    break;
  ------------------
 1788|  6.78k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  6.78k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 6.78k, False: 3.61M]
  |  |  ------------------
  |  | 1784|  6.78k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  6.78k|    pos->columnNumber++;                                                       \
  |  | 1786|  6.78k|    break;
  ------------------
 1789|  1.71k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  1.71k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.71k, False: 3.61M]
  |  |  ------------------
  |  | 1784|  1.71k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.71k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.71k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|   182k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 182k, False: 3.43M]
  ------------------
 1792|   182k|      pos->columnNumber = 0;
 1793|   182k|      pos->lineNumber++;
 1794|   182k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   182k|#  define MINBPC(enc) 1
  ------------------
 1795|   182k|      break;
 1796|  1.21M|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 1.21M, False: 2.40M]
  ------------------
 1797|  1.21M|      pos->lineNumber++;
 1798|  1.21M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.21M|#  define MINBPC(enc) 1
  ------------------
 1799|  1.21M|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  1.21M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.42M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.21M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.21M, False: 68]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.21M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.21M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 670k, False: 543k]
  ------------------
 1800|   670k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   670k|#  define MINBPC(enc) 1
  ------------------
 1801|  1.21M|      pos->columnNumber = 0;
 1802|  1.21M|      break;
 1803|  2.21M|    default:
  ------------------
  |  Branch (1803:5): [True: 2.21M, False: 1.40M]
  ------------------
 1804|  2.21M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.21M|#  define MINBPC(enc) 1
  ------------------
 1805|  2.21M|      pos->columnNumber++;
 1806|  2.21M|      break;
 1807|  3.61M|    }
 1808|  3.61M|  }
 1809|  4.63k|}
xmltok.c:normal_isPublicId:
 1450|  2.55k|                   const char **badPtr) {
 1451|  2.55k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.55k|#  define MINBPC(enc) 1
  ------------------
 1452|  2.55k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  2.55k|#  define MINBPC(enc) 1
  ------------------
 1453|  40.3k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  40.3k|#  define MINBPC(enc) 1
  ------------------
 1454|  40.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  40.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  40.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|  1.45k|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 1.45k, False: 38.9k]
  ------------------
 1456|  5.19k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 3.74k, False: 36.6k]
  ------------------
 1457|  10.5k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 5.39k, False: 34.9k]
  ------------------
 1458|  10.9k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 314, False: 40.0k]
  ------------------
 1459|  12.4k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 1.52k, False: 38.8k]
  ------------------
 1460|  13.5k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 1.10k, False: 39.2k]
  ------------------
 1461|  13.7k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 262, False: 40.0k]
  ------------------
 1462|  14.2k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 453, False: 39.8k]
  ------------------
 1463|  14.6k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 398, False: 39.9k]
  ------------------
 1464|  15.0k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 410, False: 39.9k]
  ------------------
 1465|  15.4k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 443, False: 39.9k]
  ------------------
 1466|  16.9k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 1.49k, False: 38.8k]
  ------------------
 1467|  20.0k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 3.05k, False: 37.3k]
  ------------------
 1468|  22.1k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 2.09k, False: 38.2k]
  ------------------
 1469|  22.4k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 261, False: 40.0k]
  ------------------
 1470|  22.7k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 306, False: 40.0k]
  ------------------
 1471|  22.9k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 231, False: 40.1k]
  ------------------
 1472|  25.8k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 2.95k, False: 37.3k]
  ------------------
 1473|  25.8k|#  ifdef XML_NS
 1474|  25.8k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 40.3k]
  ------------------
 1475|  25.8k|#  endif
 1476|  25.8k|      break;
 1477|    361|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 361, False: 39.9k]
  ------------------
 1478|    361|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    361|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 360]
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    360|      break;
 1483|  1.00k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 1.00k, False: 39.3k]
  ------------------
 1484|  13.3k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 12.3k, False: 28.0k]
  ------------------
 1485|  13.3k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  13.3k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 13.3k, False: 0]
  ------------------
 1486|  13.3k|        break;
 1487|       |      /* fall through */
 1488|    761|    default:
  ------------------
  |  Branch (1488:5): [True: 761, False: 39.5k]
  ------------------
 1489|    761|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    761|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    414|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 414, False: 347]
  ------------------
 1491|    751|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 337, False: 424]
  ------------------
 1492|    751|        break;
 1493|     10|      default:
  ------------------
  |  Branch (1493:7): [True: 10, False: 751]
  ------------------
 1494|     10|        *badPtr = ptr;
 1495|     10|        return 0;
 1496|    761|      }
 1497|    751|      break;
 1498|  40.3k|    }
 1499|  40.3k|  }
 1500|  2.54k|  return 1;
 1501|  2.55k|}
xmltok.c:little2_prologTok:
 1018|  74.5k|                  const char **nextTokPtr) {
 1019|  74.5k|  int tok;
 1020|  74.5k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 303, False: 74.2k]
  ------------------
 1021|    303|    return XML_TOK_NONE;
  ------------------
  |  |   51|    303|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  74.2k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  74.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  74.2k|    size_t n = end - ptr;
 1024|  74.2k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  74.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 30.3k, False: 43.8k]
  ------------------
 1025|  30.3k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  30.3k|#  define MINBPC(enc) 2
  ------------------
 1026|  30.3k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 21, False: 30.3k]
  ------------------
 1027|     21|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  30.3k|      end = ptr + n;
 1029|  30.3k|    }
 1030|  74.2k|  }
 1031|  74.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  74.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  74.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  70.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 70.8k, False: 3.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.75k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.75k, False: 72.4k]
  ------------------
 1033|  1.75k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.75k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.75k|#  define MINBPC(enc) 2
  ------------------
 1034|  2.87k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 2.87k, False: 71.3k]
  ------------------
 1035|  2.87k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.87k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.87k|#  define MINBPC(enc) 2
  ------------------
 1036|  11.2k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 11.2k, False: 62.9k]
  ------------------
 1037|  11.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  11.2k|#  define MINBPC(enc) 2
  ------------------
 1038|  11.2k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.2k|    {                                                                          \
  |  |  |  |  135|  11.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  11.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 11.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  11.2k|    }
  |  |  ------------------
  ------------------
 1039|  11.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  11.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  11.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.95k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 6, False: 11.2k]
  |  |  |  |  |  Branch (737:4): [True: 9.95k, False: 1.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  5.40k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 5.40k, False: 5.82k]
  ------------------
 1041|  5.40k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.40k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.40k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.29k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.29k, False: 8.92k]
  ------------------
 1043|  2.29k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.29k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.29k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.44k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.44k, False: 9.77k]
  ------------------
 1045|  2.25k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 804, False: 10.4k]
  ------------------
 1046|  3.50k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.25k, False: 9.97k]
  ------------------
 1047|  3.50k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 11.2k]
  ------------------
 1048|  3.50k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 11.2k]
  ------------------
 1049|  3.52k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 19, False: 11.2k]
  ------------------
 1050|  3.52k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.52k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.52k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.52k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  11.2k|    }
 1053|      6|    *nextTokPtr = ptr;
 1054|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
 1055|  11.2k|  }
 1056|  4.71k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.71k, False: 69.5k]
  ------------------
 1057|  4.71k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  4.71k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 83, False: 4.63k]
  ------------------
 1058|     83|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     83|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     83|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     83|    }
 1062|       |    /* fall through */
 1063|  14.4k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 9.80k, False: 64.4k]
  ------------------
 1064|  20.4k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 6.04k, False: 68.1k]
  ------------------
 1065|  22.3k|    for (;;) {
 1066|  22.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  22.3k|#  define MINBPC(enc) 2
  ------------------
 1067|  22.3k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  22.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  22.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  22.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 180, False: 22.1k]
  ------------------
 1068|    180|        break;
 1069|  22.1k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  22.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  22.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  19.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 19.5k, False: 2.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|    907|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 907, False: 21.2k]
  ------------------
 1071|  1.50k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 593, False: 21.5k]
  ------------------
 1072|  1.50k|        break;
 1073|    340|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 340, False: 21.7k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    340|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    340|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 336, False: 4]
  ------------------
 1076|    336|          break;
 1077|       |        /* fall through */
 1078|  20.3k|      default:
  ------------------
  |  Branch (1078:7): [True: 20.2k, False: 1.84k]
  ------------------
 1079|  20.3k|        *nextTokPtr = ptr;
 1080|  20.3k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  20.3k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  22.1k|      }
 1082|  22.1k|    }
 1083|    180|    *nextTokPtr = ptr;
 1084|    180|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    180|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.66k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.66k, False: 71.5k]
  ------------------
 1086|  2.66k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.66k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.66k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.14k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.14k, False: 72.0k]
  ------------------
 1088|  2.14k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.14k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.14k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.14k|#define XML_TOK_COMMA 38
  ------------------
 1090|    927|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 927, False: 73.2k]
  ------------------
 1091|    927|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    927|#  define MINBPC(enc) 2
  ------------------
 1092|    927|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|    927|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    403|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 403, False: 73.8k]
  ------------------
 1094|    403|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    403|#  define MINBPC(enc) 2
  ------------------
 1095|    403|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    403|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    403|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    403|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 401]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    401|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    401|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    401|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 390, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 42, False: 348]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     42|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     42|    {                                                                          \
  |  |  135|     42|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     42|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     42|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 41]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     42|    }
  ------------------
 1099|     41|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     41|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     41|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 23, False: 18]
  |  |  |  |  |  Branch (739:52): [True: 3, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      3|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      3|#  define MINBPC(enc) 2
  ------------------
 1101|      3|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      3|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      3|      }
 1103|     41|    }
 1104|    397|    *nextTokPtr = ptr;
 1105|    397|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    397|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  5.22k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 5.22k, False: 68.9k]
  ------------------
 1107|  5.22k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.22k|#  define MINBPC(enc) 2
  ------------------
 1108|  5.22k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  5.22k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.72k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.72k, False: 70.4k]
  ------------------
 1110|  3.72k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.72k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.72k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.72k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.72k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.72k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 7, False: 3.72k]
  ------------------
 1112|      7|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      7|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.72k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.72k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.72k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 39, False: 3.68k]
  |  |  |  |  |  Branch (737:4): [True: 3.69k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    251|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 251, False: 3.47k]
  ------------------
 1115|    251|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    251|#  define MINBPC(enc) 2
  ------------------
 1116|    251|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    251|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    709|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 709, False: 3.01k]
  ------------------
 1118|    709|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    709|#  define MINBPC(enc) 2
  ------------------
 1119|    709|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    709|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    232|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 232, False: 3.48k]
  ------------------
 1121|    232|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    232|#  define MINBPC(enc) 2
  ------------------
 1122|    232|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    232|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|     35|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 35, False: 3.68k]
  ------------------
 1124|    331|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 296, False: 3.42k]
  ------------------
 1125|    525|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 194, False: 3.52k]
  ------------------
 1126|    620|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 95, False: 3.62k]
  ------------------
 1127|    979|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 359, False: 3.36k]
  ------------------
 1128|  1.26k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 290, False: 3.43k]
  ------------------
 1129|  2.49k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.22k, False: 2.50k]
  ------------------
 1130|  2.49k|      *nextTokPtr = ptr;
 1131|  2.49k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  2.49k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.72k|    }
 1133|     39|    *nextTokPtr = ptr;
 1134|     39|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.93k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.93k, False: 71.2k]
  ------------------
 1136|  2.93k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.93k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.93k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.93k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  3.58k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 3.58k, False: 70.6k]
  ------------------
 1139|  3.58k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.58k|#  define MINBPC(enc) 2
  ------------------
 1140|  3.58k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  3.58k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  1.36k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 1.36k, False: 72.8k]
  ------------------
 1142|  1.36k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.36k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.36k|#  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: 74.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)) {                                         \
  |  |  ------------------
  |  |  |  |  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: 74.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)) {                                         \
  |  |  ------------------
  |  |  |  |  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|     81|    LEAD_CASE(4)
  ------------------
  |  | 1144|     19|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 24, False: 74.1k]
  |  |  ------------------
  |  | 1145|     24|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 19]
  |  |  ------------------
  |  | 1146|     19|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     19|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     19|#    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|     19|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     19|#  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|     19|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     19|#  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|     19|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     19|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  6.74k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 6.74k, False: 67.4k]
  ------------------
 1168|  10.5k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 3.76k, False: 70.4k]
  ------------------
 1169|  10.5k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  10.5k|#define XML_TOK_NAME 18
  ------------------
 1170|  10.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.5k|#  define MINBPC(enc) 2
  ------------------
 1171|  10.5k|    break;
 1172|    469|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 469, False: 73.7k]
  ------------------
 1173|    667|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 198, False: 74.0k]
  ------------------
 1174|    908|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 241, False: 73.9k]
  ------------------
 1175|    908|#  ifdef XML_NS
 1176|    908|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 74.2k]
  ------------------
 1177|    908|#  endif
 1178|    908|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    908|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    908|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    908|#  define MINBPC(enc) 2
  ------------------
 1180|    908|    break;
 1181|  3.35k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 3.35k, False: 70.8k]
  ------------------
 1182|  3.35k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  3.35k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  3.35k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  3.35k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 2.90k, False: 450]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  2.90k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.90k|#  define MINBPC(enc) 2
  ------------------
 1184|  2.90k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  2.90k|#define XML_TOK_NAME 18
  ------------------
 1185|  2.90k|      break;
 1186|  2.90k|    }
 1187|    450|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    450|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    450|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    450|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 414, False: 36]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    414|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    414|#  define MINBPC(enc) 2
  ------------------
 1189|    414|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    414|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    414|      break;
 1191|    414|    }
 1192|       |    /* fall through */
 1193|     49|  default:
  ------------------
  |  Branch (1193:3): [True: 13, False: 74.2k]
  ------------------
 1194|     49|    *nextTokPtr = ptr;
 1195|     49|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     49|#define XML_TOK_INVALID 0
  ------------------
 1196|  74.2k|  }
 1197|  34.4k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  34.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  34.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  34.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 29.6k, False: 4.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  75.4k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  19.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 4.73k, False: 29.6k]
  |  |  ------------------
  |  |   82|  19.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  4.73k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.73k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.73k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 31, False: 4.70k]
  |  |  ------------------
  |  |   83|     31|      *nextTokPtr = ptr;                                                       \
  |  |   84|     31|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     31|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     31|    }                                                                          \
  |  |   86|  19.8k|    /* fall through */                                                         \
  |  |   87|  19.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 7.92k, False: 26.5k]
  |  |  ------------------
  |  |   88|  19.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.46k, False: 27.9k]
  |  |  ------------------
  |  |   89|  19.3k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 281, False: 34.1k]
  |  |  ------------------
  |  |   90|  19.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 34.2k]
  |  |  ------------------
  |  |   91|  19.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 269, False: 34.1k]
  |  |  ------------------
  |  |   92|  19.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  19.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  19.8k|    break;                                                                     \
  |  |   94|  19.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 34.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 34.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     20|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 34.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    105|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 105, False: 34.3k]
  ------------------
 1201|  1.80k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.70k, False: 32.7k]
  ------------------
 1202|  2.48k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 677, False: 33.7k]
  ------------------
 1203|  3.93k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.44k, False: 32.9k]
  ------------------
 1204|  4.80k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 870, False: 33.5k]
  ------------------
 1205|  4.80k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 2, False: 34.4k]
  ------------------
 1206|  9.52k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 4.71k, False: 29.7k]
  ------------------
 1207|  11.1k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.63k, False: 32.7k]
  ------------------
 1208|  13.9k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.84k, False: 31.5k]
  ------------------
 1209|  13.9k|      *nextTokPtr = ptr;
 1210|  13.9k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 34.4k]
  ------------------
 1213|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
 1214|      0|      switch (tok) {
  ------------------
  |  Branch (1214:15): [True: 0, False: 0]
  ------------------
 1215|      0|      case XML_TOK_NAME:
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
 1217|      0|        tok = XML_TOK_PREFIXED_NAME;
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
 1218|      0|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1219|      0|          CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|      0|    /* fall through */                                                         \
  |  |   87|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   89|      0|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   90|      0|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|      0|    break;                                                                     \
  |  |   94|      0|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      0|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1220|      0|        default:
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|          tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1222|      0|          break;
 1223|      0|        }
 1224|      0|        break;
 1225|      0|      case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1225:7): [True: 0, False: 0]
  ------------------
 1226|      0|        tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1227|      0|        break;
 1228|      0|      }
 1229|      0|      break;
 1230|      0|#  endif
 1231|    198|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 198, False: 34.2k]
  ------------------
 1232|    198|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    198|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 197]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    197|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    197|#  define MINBPC(enc) 2
  ------------------
 1237|    197|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    197|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|     68|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 68, False: 34.3k]
  ------------------
 1239|     68|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     68|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 67]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|     67|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|     67|#  define MINBPC(enc) 2
  ------------------
 1244|     67|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|     67|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    262|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 262, False: 34.1k]
  ------------------
 1246|    262|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    262|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 261]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    261|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    261|#  define MINBPC(enc) 2
  ------------------
 1251|    261|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    261|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     14|    default:
  ------------------
  |  Branch (1252:5): [True: 14, False: 34.4k]
  ------------------
 1253|     14|      *nextTokPtr = ptr;
 1254|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
 1255|  34.4k|    }
 1256|  34.4k|  }
 1257|    146|  return -tok;
 1258|  14.7k|}
xmltok.c:little2_scanLit:
  984|  4.63k|                const char **nextTokPtr) {
  985|  5.90M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  5.90M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  5.90M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.90M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   159k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 159k, False: 5.74M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  5.90M|    switch (t) {
  988|   530k|      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.90M]
  |  |  |  |  ------------------
  |  |  |  |   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.90M]
  |  |  |  |  ------------------
  |  |  |  |   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|   265k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   265k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 265k, False: 5.64M]
  |  |  |  |  ------------------
  |  |  |  |   50|   265k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 265k]
  |  |  |  |  ------------------
  |  |  |  |   51|   265k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   265k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   265k|#    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|   265k|    ptr += n;                                                                  \
  |  |  |  |   57|   265k|    break;
  |  |  ------------------
  |  |   63|   265k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 13, False: 5.90M]
  |  |  ------------------
  |  |   64|     13|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 5.90M]
  |  |  ------------------
  |  |   65|     19|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 5.90M]
  |  |  ------------------
  |  |   66|     19|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     19|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  5.01k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 5.01k, False: 5.90M]
  ------------------
  990|  8.54k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 3.53k, False: 5.90M]
  ------------------
  991|  8.54k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  8.54k|#  define MINBPC(enc) 2
  ------------------
  992|  8.54k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 4.02k, False: 4.52k]
  ------------------
  993|  4.02k|        break;
  994|  4.52k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.52k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.52k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 2, False: 4.52k]
  ------------------
  995|      2|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      2|#define XML_TOK_LITERAL 27
  ------------------
  996|  4.52k|      *nextTokPtr = ptr;
  997|  4.52k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.52k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.52k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.49k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.49k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|    236|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 236, False: 4.28k]
  ------------------
  999|  1.44k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.21k, False: 3.31k]
  ------------------
 1000|  2.50k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.05k, False: 3.46k]
  ------------------
 1001|  4.45k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 1.95k, False: 2.56k]
  ------------------
 1002|  4.47k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 16, False: 4.50k]
  ------------------
 1003|  4.48k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 13, False: 4.51k]
  ------------------
 1004|  4.48k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  4.48k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     38|      default:
  ------------------
  |  Branch (1005:7): [True: 38, False: 4.48k]
  ------------------
 1006|     38|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     38|#define XML_TOK_INVALID 0
  ------------------
 1007|  4.52k|      }
 1008|  5.63M|    default:
  ------------------
  |  Branch (1008:5): [True: 5.63M, False: 273k]
  ------------------
 1009|  5.63M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.63M|#  define MINBPC(enc) 2
  ------------------
 1010|  5.63M|      break;
 1011|  5.90M|    }
 1012|  5.90M|  }
 1013|     59|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     59|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  4.63k|}
xmltok.c:little2_scanDecl:
  183|  5.40k|                 const char **nextTokPtr) {
  184|  5.40k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.40k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.40k|    {                                                                          \
  |  |  |  |  135|  5.40k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.40k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.40k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 5.39k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  5.40k|    }
  |  |  ------------------
  ------------------
  185|  5.39k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.39k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.39k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.37k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.37k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    420|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 420, False: 4.97k]
  ------------------
  187|    420|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    420|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    420|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 5.39k]
  ------------------
  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|    378|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 378, False: 5.02k]
  ------------------
  192|  4.95k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 4.57k, False: 823]
  ------------------
  193|  4.95k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.95k|#  define MINBPC(enc) 2
  ------------------
  194|  4.95k|    break;
  195|     24|  default:
  ------------------
  |  Branch (195:3): [True: 24, False: 5.37k]
  ------------------
  196|     24|    *nextTokPtr = ptr;
  197|     24|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  198|  5.39k|  }
  199|  32.3k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  32.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  32.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  32.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  32.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 32.2k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     35|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 35, False: 32.2k]
  ------------------
  202|     35|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     35|    {                                                                          \
  |  |  135|     35|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     35|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     35|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 33]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     35|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     33|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     33|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     33|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|     10|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 28, False: 5]
  |  |  |  |  |  Branch (737:4): [True: 10, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 32]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 32]
  ------------------
  207|      4|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 2, False: 31]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 32]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|     33|      }
  212|       |      /* fall through */
  213|  3.17k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 3.15k, False: 29.1k]
  ------------------
  214|  4.25k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.07k, False: 31.2k]
  ------------------
  215|  4.88k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 634, False: 31.6k]
  ------------------
  216|  4.88k|      *nextTokPtr = ptr;
  217|  4.88k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  4.88k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  23.8k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 23.8k, False: 8.46k]
  ------------------
  219|  27.3k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 3.54k, False: 28.7k]
  ------------------
  220|  27.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  27.3k|#  define MINBPC(enc) 2
  ------------------
  221|  27.3k|      break;
  222|     31|    default:
  ------------------
  |  Branch (222:5): [True: 31, False: 32.2k]
  ------------------
  223|     31|      *nextTokPtr = ptr;
  224|     31|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  225|  32.3k|    }
  226|  32.3k|  }
  227|     29|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  4.95k|}
xmltok.c:little2_scanComment:
  146|    619|                    const char **nextTokPtr) {
  147|    619|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    619|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    619|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    619|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 606, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    606|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    606|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    606|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 597, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 585, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     21|      *nextTokPtr = ptr;
  150|     21|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  151|     21|    }
  152|    585|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    585|#  define MINBPC(enc) 2
  ------------------
  153|   138k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   138k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   138k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   138k|  ((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:4): [True: 11.4k, False: 127k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  15.6k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 138k]
  |  |  |  |  ------------------
  |  |  |  |   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: 138k]
  |  |  |  |  ------------------
  |  |  |  |   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.81k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.78k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.81k, False: 130k]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.81k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 7.78k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.78k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.78k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  7.78k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  7.78k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.78k|    break;
  |  |  ------------------
  |  |   63|  7.78k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 36, False: 138k]
  |  |  ------------------
  |  |   64|     36|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 138k]
  |  |  ------------------
  |  |   65|     43|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 138k]
  |  |  ------------------
  |  |   66|     43|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     43|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     43|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|    976|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 976, False: 137k]
  ------------------
  157|    976|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    976|#  define MINBPC(enc) 2
  ------------------
  158|    976|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    976|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    976|    {                                                                          \
  |  |  |  |  135|    976|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    976|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    976|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 974]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|    976|    }
  |  |  ------------------
  ------------------
  159|    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: 700, False: 274]
  |  |  |  |  |  Branch (739:52): [True: 443, False: 257]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    443|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    443|#  define MINBPC(enc) 2
  ------------------
  161|    443|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    443|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    443|    {                                                                          \
  |  |  |  |  135|    443|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    443|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    443|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 442]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    443|    }
  |  |  ------------------
  ------------------
  162|    442|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    442|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    442|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 434, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 426, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     16|            *nextTokPtr = ptr;
  164|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  165|     16|          }
  166|    426|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    426|#  define MINBPC(enc) 2
  ------------------
  167|    426|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    426|#define XML_TOK_COMMENT 13
  ------------------
  168|    442|        }
  169|    531|        break;
  170|   129k|      default:
  ------------------
  |  Branch (170:7): [True: 129k, False: 8.83k]
  ------------------
  171|   129k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   129k|#  define MINBPC(enc) 2
  ------------------
  172|   129k|        break;
  173|   138k|      }
  174|   138k|    }
  175|    585|  }
  176|     81|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    619|}
xmltok.c:little2_scanPi:
  277|  5.76k|               const char **nextTokPtr) {
  278|  5.76k|  int tok;
  279|  5.76k|  const char *target = ptr;
  280|  5.76k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.76k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.76k|    {                                                                          \
  |  |  |  |  135|  5.76k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.76k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.76k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 5.75k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  5.76k|    }
  |  |  ------------------
  ------------------
  281|  5.75k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.75k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.75k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.69k, False: 1.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  6.24k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.70k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.02k, False: 4.72k]
  |  |  ------------------
  |  |  111|  5.70k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.02k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.02k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.02k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 1.01k]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  5.70k|    /* fall through */                                                         \
  |  |  116|  5.70k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.16k, False: 1.58k]
  |  |  ------------------
  |  |  117|  5.70k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 527, False: 5.22k]
  |  |  ------------------
  |  |  118|  5.70k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  5.70k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  5.70k|    break;                                                                     \
  |  |  120|  5.70k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|     26|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 26, False: 5.72k]
  |  |  |  |  ------------------
  |  |  |  |  100|     26|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 22]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     22|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     44|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     22|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     22|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     22|    }                                                                          \
  |  |  |  |  106|     22|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      7|  default:
  ------------------
  |  Branch (283:3): [True: 7, False: 5.74k]
  ------------------
  284|      7|    *nextTokPtr = ptr;
  285|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  286|  5.75k|  }
  287|   471k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   471k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   471k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   471k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.4k, False: 458k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  2.31M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   465k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 458k, False: 12.4k]
  |  |  ------------------
  |  |   82|   465k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|   458k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   458k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   458k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 23, False: 458k]
  |  |  ------------------
  |  |   83|     23|      *nextTokPtr = ptr;                                                       \
  |  |   84|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     23|    }                                                                          \
  |  |   86|   465k|    /* fall through */                                                         \
  |  |   87|   465k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.99k, False: 466k]
  |  |  ------------------
  |  |   88|   464k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 998, False: 470k]
  |  |  ------------------
  |  |   89|   465k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 416, False: 470k]
  |  |  ------------------
  |  |   90|   465k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 470k]
  |  |  ------------------
  |  |   91|   465k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 239, False: 470k]
  |  |  ------------------
  |  |   92|   465k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   465k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   465k|    break;                                                                     \
  |  |   94|   465k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 471k]
  |  |  |  |  ------------------
  |  |  |  |   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: 471k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 471k]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.23k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.23k, False: 469k]
  ------------------
  291|  1.76k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 536, False: 470k]
  ------------------
  292|  2.87k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.10k, False: 470k]
  ------------------
  293|  2.87k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.87k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.86k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.86k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.86k|#  define MINBPC(enc) 2
  ------------------
  298|   133k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   133k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   133k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   133k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 15.4k, False: 117k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  42.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: 133k]
  |  |  |  |  ------------------
  |  |  |  |   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: 133k]
  |  |  |  |  ------------------
  |  |  |  |   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|  21.0k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  20.9k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 21.0k, False: 112k]
  |  |  |  |  ------------------
  |  |  |  |   50|  21.0k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 27, False: 20.9k]
  |  |  |  |  ------------------
  |  |  |  |   51|  20.9k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     27|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  20.9k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  20.9k|#    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|  20.9k|    ptr += n;                                                                  \
  |  |  |  |   57|  20.9k|    break;
  |  |  ------------------
  |  |   63|  20.9k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 19, False: 133k]
  |  |  ------------------
  |  |   64|     19|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 133k]
  |  |  ------------------
  |  |   65|     23|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 133k]
  |  |  ------------------
  |  |   66|     23|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     23|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.61k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.61k, False: 129k]
  ------------------
  302|  3.61k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.61k|#  define MINBPC(enc) 2
  ------------------
  303|  3.61k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.61k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.61k|    {                                                                          \
  |  |  |  |  135|  3.61k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.61k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.61k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 3.61k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  3.61k|    }
  |  |  ------------------
  ------------------
  304|  3.61k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  3.61k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.61k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.27k, False: 338]
  |  |  |  |  |  Branch (739:52): [True: 2.67k, False: 601]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.67k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.67k|#  define MINBPC(enc) 2
  ------------------
  306|  2.67k|            return tok;
  307|  2.67k|          }
  308|    939|          break;
  309|   108k|        default:
  ------------------
  |  Branch (309:9): [True: 108k, False: 24.6k]
  ------------------
  310|   108k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   108k|#  define MINBPC(enc) 2
  ------------------
  311|   108k|          break;
  312|   133k|        }
  313|   133k|      }
  314|    141|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    141|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.70k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.70k, False: 468k]
  ------------------
  316|  2.70k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.70k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 2.70k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  2.70k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.70k|#  define MINBPC(enc) 2
  ------------------
  321|  2.70k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.70k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.70k|    {                                                                          \
  |  |  |  |  135|  2.70k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.70k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.70k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 41, False: 2.66k]
  |  |  |  |  ------------------
  |  |  |  |  136|     41|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     41|      }                                                                        \
  |  |  |  |  138|  2.70k|    }
  |  |  ------------------
  ------------------
  322|  2.66k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.66k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.66k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.64k, False: 15]
  |  |  |  |  |  Branch (739:52): [True: 2.62k, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.62k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.62k|#  define MINBPC(enc) 2
  ------------------
  324|  2.62k|        return tok;
  325|  2.62k|      }
  326|       |      /* fall through */
  327|     44|    default:
  ------------------
  |  Branch (327:5): [True: 10, False: 471k]
  ------------------
  328|     44|      *nextTokPtr = ptr;
  329|     44|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     44|#define XML_TOK_INVALID 0
  ------------------
  330|   471k|    }
  331|   471k|  }
  332|     76|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     76|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  5.70k|}
xmltok.c:little2_checkPiTarget:
  232|  5.57k|                      int *tokPtr) {
  233|  5.57k|  int upper = 0;
  234|  5.57k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.57k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.57k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.57k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.57k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  5.57k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.24k, False: 3.32k]
  ------------------
  237|  2.24k|    return 1;
  238|  3.32k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.32k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.32k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.85k, False: 474]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.50k|  case ASCII_x:
  ------------------
  |  |   86|  1.50k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.50k, False: 1.82k]
  ------------------
  240|  1.50k|    break;
  241|  1.28k|  case ASCII_X:
  ------------------
  |  |   59|  1.28k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.28k, False: 2.03k]
  ------------------
  242|  1.28k|    upper = 1;
  243|  1.28k|    break;
  244|    531|  default:
  ------------------
  |  Branch (244:3): [True: 531, False: 2.79k]
  ------------------
  245|    531|    return 1;
  246|  3.32k|  }
  247|  2.79k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.79k|#  define MINBPC(enc) 2
  ------------------
  248|  2.79k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.79k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.79k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.26k, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|  1.09k|  case ASCII_m:
  ------------------
  |  |   75|  1.09k|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 1.09k, False: 1.69k]
  ------------------
  250|  1.09k|    break;
  251|    782|  case ASCII_M:
  ------------------
  |  |   48|    782|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 782, False: 2.01k]
  ------------------
  252|    782|    upper = 1;
  253|    782|    break;
  254|    916|  default:
  ------------------
  |  Branch (254:3): [True: 916, False: 1.87k]
  ------------------
  255|    916|    return 1;
  256|  2.79k|  }
  257|  1.87k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.87k|#  define MINBPC(enc) 2
  ------------------
  258|  1.87k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.87k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.87k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.23k, False: 649]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     43|  case ASCII_l:
  ------------------
  |  |   74|     43|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 43, False: 1.83k]
  ------------------
  260|     43|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.87k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.83k|  default:
  ------------------
  |  Branch (264:3): [True: 1.83k, False: 45]
  ------------------
  265|  1.83k|    return 1;
  266|  1.87k|  }
  267|     45|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 41]
  ------------------
  268|      4|    return 0;
  269|     41|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     41|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     41|  return 1;
  271|     45|}
xmltok.c:little2_scanPercent:
  924|  2.66k|                    const char **nextTokPtr) {
  925|  2.66k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.66k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.66k|    {                                                                          \
  |  |  |  |  135|  2.66k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.66k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.66k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 18, False: 2.64k]
  |  |  |  |  ------------------
  |  |  |  |  136|     18|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     18|      }                                                                        \
  |  |  |  |  138|  2.66k|    }
  |  |  ------------------
  ------------------
  926|  2.64k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.64k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.64k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.28k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.28k, False: 361]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.11k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.02k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 341, False: 2.30k]
  |  |  ------------------
  |  |  111|  1.02k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    341|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    341|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    341|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 330]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  1.02k|    /* fall through */                                                         \
  |  |  116|  1.02k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 419, False: 2.23k]
  |  |  ------------------
  |  |  117|  1.02k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 277, False: 2.37k]
  |  |  ------------------
  |  |  118|  1.02k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.02k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.02k|    break;                                                                     \
  |  |  120|  1.02k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.64k]
  |  |  |  |  ------------------
  |  |  |  |  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: 2.63k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  928|    445|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 445, False: 2.20k]
  ------------------
  929|  1.29k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 850, False: 1.79k]
  ------------------
  930|  1.58k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 293, False: 2.35k]
  ------------------
  931|  1.59k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.64k]
  ------------------
  932|  1.59k|    *nextTokPtr = ptr;
  933|  1.59k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.59k|#define XML_TOK_PERCENT 22
  ------------------
  934|      6|  default:
  ------------------
  |  Branch (934:3): [True: 6, False: 2.64k]
  ------------------
  935|      6|    *nextTokPtr = ptr;
  936|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  937|  2.64k|  }
  938|  2.77k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.77k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.77k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.77k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.31k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.31k, False: 460]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  5.33k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.82k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 445, False: 2.33k]
  |  |  ------------------
  |  |   82|  1.82k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    445|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    445|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    445|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 427]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  1.82k|    /* fall through */                                                         \
  |  |   87|  1.82k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 405, False: 2.37k]
  |  |  ------------------
  |  |   88|  1.10k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 273, False: 2.50k]
  |  |  ------------------
  |  |   89|  1.37k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 267, False: 2.50k]
  |  |  ------------------
  |  |   90|  1.57k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 2.57k]
  |  |  ------------------
  |  |   91|  1.82k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 254, False: 2.52k]
  |  |  ------------------
  |  |   92|  1.82k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.82k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.82k|    break;                                                                     \
  |  |   94|  1.82k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.77k]
  |  |  |  |  ------------------
  |  |  |  |   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.77k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.76k]
  |  |  |  |  ------------------
  |  |  |  |   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|    915|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 915, False: 1.86k]
  ------------------
  942|    915|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    915|#  define MINBPC(enc) 2
  ------------------
  943|    915|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    915|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     10|    default:
  ------------------
  |  Branch (944:5): [True: 10, False: 2.76k]
  ------------------
  945|     10|      *nextTokPtr = ptr;
  946|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  947|  2.77k|    }
  948|  2.77k|  }
  949|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.02k|}
xmltok.c:little2_scanPoundName:
  954|  1.36k|                      const char **nextTokPtr) {
  955|  1.36k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.36k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.36k|    {                                                                          \
  |  |  |  |  135|  1.36k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.36k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.36k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.36k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.36k|    }
  |  |  ------------------
  ------------------
  956|  1.36k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.36k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.36k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.25k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.25k, False: 104]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.04k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.32k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 79, False: 1.28k]
  |  |  ------------------
  |  |  111|  1.32k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     79|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     79|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     79|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 66]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  1.32k|    /* fall through */                                                         \
  |  |  116|  1.32k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 861, False: 502]
  |  |  ------------------
  |  |  117|  1.32k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 398, False: 965]
  |  |  ------------------
  |  |  118|  1.32k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.32k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.32k|    break;                                                                     \
  |  |  120|  1.32k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.36k]
  |  |  |  |  ------------------
  |  |  |  |  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.36k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 1.34k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      6|  default:
  ------------------
  |  Branch (958:3): [True: 6, False: 1.35k]
  ------------------
  959|      6|    *nextTokPtr = ptr;
  960|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  961|  1.36k|  }
  962|  9.66k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  9.66k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.66k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.66k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.29k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.29k, False: 375]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  28.4k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  8.39k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 356, False: 9.30k]
  |  |  ------------------
  |  |   82|  8.39k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    356|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    356|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    356|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 28, False: 328]
  |  |  ------------------
  |  |   83|     28|      *nextTokPtr = ptr;                                                       \
  |  |   84|     28|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     28|    }                                                                          \
  |  |   86|  8.39k|    /* fall through */                                                         \
  |  |   87|  8.39k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.01k, False: 5.65k]
  |  |  ------------------
  |  |   88|  7.67k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.33k, False: 6.33k]
  |  |  ------------------
  |  |   89|  7.90k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 237, False: 9.42k]
  |  |  ------------------
  |  |   90|  8.16k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 258, False: 9.40k]
  |  |  ------------------
  |  |   91|  8.39k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 234, False: 9.43k]
  |  |  ------------------
  |  |   92|  8.39k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  8.39k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  8.39k|    break;                                                                     \
  |  |   94|  8.39k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 9.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 9.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     10|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 9.65k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    364|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 364, False: 9.30k]
  ------------------
  966|    717|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 353, False: 9.31k]
  ------------------
  967|  1.03k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 314, False: 9.35k]
  ------------------
  968|  1.08k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 50, False: 9.61k]
  ------------------
  969|  1.14k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 66, False: 9.59k]
  ------------------
  970|  1.14k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 9.66k]
  ------------------
  971|  1.21k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 66, False: 9.59k]
  ------------------
  972|  1.21k|      *nextTokPtr = ptr;
  973|  1.21k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.21k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     14|    default:
  ------------------
  |  Branch (974:5): [True: 14, False: 9.65k]
  ------------------
  975|     14|      *nextTokPtr = ptr;
  976|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  977|  9.66k|    }
  978|  9.66k|  }
  979|     59|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     59|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  1.32k|}
xmltok.c:little2_contentTok:
  824|  49.3k|                   const char **nextTokPtr) {
  825|  49.3k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.09k, False: 48.2k]
  ------------------
  826|  1.09k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.09k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  48.2k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  48.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  48.2k|    size_t n = end - ptr;
  829|  48.2k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  48.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 17.3k, False: 30.8k]
  ------------------
  830|  17.3k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  17.3k|#  define MINBPC(enc) 2
  ------------------
  831|  17.3k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 95, False: 17.2k]
  ------------------
  832|     95|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     95|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  17.2k|      end = ptr + n;
  834|  17.2k|    }
  835|  48.2k|  }
  836|  48.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  48.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  48.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  40.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 40.9k, False: 7.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  14.5k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 14.5k, False: 33.6k]
  ------------------
  838|  14.5k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  14.5k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  14.5k|#  define MINBPC(enc) 2
  ------------------
  839|  9.45k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 9.45k, False: 38.6k]
  ------------------
  840|  9.45k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  9.45k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  9.45k|#  define MINBPC(enc) 2
  ------------------
  841|  7.33k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 7.33k, False: 40.8k]
  ------------------
  842|  7.33k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.33k|#  define MINBPC(enc) 2
  ------------------
  843|  7.33k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.33k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.33k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  7.33k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 10, False: 7.32k]
  ------------------
  844|     10|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     10|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  7.32k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  7.32k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.32k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.40k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.40k, False: 3.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 390, False: 6.93k]
  ------------------
  846|    390|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    390|#  define MINBPC(enc) 2
  ------------------
  847|  7.32k|    *nextTokPtr = ptr;
  848|  7.32k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.32k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  2.46k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 2.46k, False: 45.6k]
  ------------------
  850|  2.46k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.46k|#  define MINBPC(enc) 2
  ------------------
  851|  2.46k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.46k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  2.30k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 2.30k, False: 45.8k]
  ------------------
  853|  2.30k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.30k|#  define MINBPC(enc) 2
  ------------------
  854|  2.30k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.30k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  2.30k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 3, False: 2.30k]
  ------------------
  855|      3|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      3|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  2.30k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  2.30k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.30k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.85k, False: 450]
  |  |  |  |  |  Branch (739:52): [True: 1.31k, False: 543]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|    993|      break;
  858|  1.31k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.31k|#  define MINBPC(enc) 2
  ------------------
  859|  1.31k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.31k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.31k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.31k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 5, False: 1.30k]
  ------------------
  860|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.30k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.30k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.30k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.06k, False: 245]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.30k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.30k|#  define MINBPC(enc) 2
  ------------------
  863|  1.30k|      break;
  864|  1.30k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  5.67k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 48.1k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 48.1k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.82k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.76k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.82k, False: 45.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.82k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 55, False: 2.76k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.76k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     55|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.76k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.76k|#    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.76k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.76k|    break;
  |  |  ------------------
  |  |   63|  2.76k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 43, False: 48.1k]
  |  |  ------------------
  |  |   64|     43|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 48.1k]
  |  |  ------------------
  |  |   65|     55|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 12, False: 48.1k]
  |  |  ------------------
  |  |   66|     55|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     55|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     55|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  9.18k|  default:
  ------------------
  |  Branch (868:3): [True: 9.18k, False: 38.9k]
  ------------------
  869|  9.18k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.18k|#  define MINBPC(enc) 2
  ------------------
  870|  9.18k|    break;
  871|  48.1k|  }
  872|   354k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   354k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   354k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   354k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  38.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 38.7k, False: 315k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 354k]
  |  |  ------------------
  |  |  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: 354k]
  |  |  ------------------
  |  |  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|  64.1k|      LEAD_CASE(4)
  ------------------
  |  |  875|  64.1k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 64.1k, False: 290k]
  |  |  ------------------
  |  |  876|  64.1k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  64.1k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 51, False: 64.1k]
  |  |  ------------------
  |  |  877|     51|      *nextTokPtr = ptr;                                                       \
  |  |  878|     51|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     51|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     51|    }                                                                          \
  |  |  880|  64.1k|    ptr += n;                                                                  \
  |  |  881|  64.1k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  4.33k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 4.33k, False: 350k]
  ------------------
  887|  4.33k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  4.33k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  4.33k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 4.33k, False: 1]
  |  |  ------------------
  ------------------
  888|  4.33k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  4.33k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.33k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.15k, False: 1.17k]
  |  |  |  |  |  Branch (739:52): [True: 1.35k, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  2.97k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.97k|#  define MINBPC(enc) 2
  ------------------
  890|  2.97k|          break;
  891|  2.97k|        }
  892|  1.35k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  1.35k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  1.35k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 1.35k, False: 4]
  |  |  ------------------
  ------------------
  893|  1.35k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|  1.35k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.35k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 762, False: 593]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 760]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  1.35k|            ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.35k|#  define MINBPC(enc) 2
  ------------------
  895|  1.35k|            break;
  896|  1.35k|          }
  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|  1.35k|        }
  900|  1.35k|      }
  901|       |      /* fall through */
  902|  3.37k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 3.37k, False: 351k]
  ------------------
  903|  6.32k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 2.94k, False: 351k]
  ------------------
  904|  6.35k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 34, False: 354k]
  ------------------
  905|  6.35k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 354k]
  ------------------
  906|  6.36k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 7, False: 354k]
  ------------------
  907|  11.7k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 5.43k, False: 348k]
  ------------------
  908|  13.8k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 2.06k, False: 352k]
  ------------------
  909|  13.8k|      *nextTokPtr = ptr;
  910|  13.8k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  13.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   272k|    default:
  ------------------
  |  Branch (911:5): [True: 272k, False: 82.3k]
  ------------------
  912|   272k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   272k|#  define MINBPC(enc) 2
  ------------------
  913|   272k|      break;
  914|   354k|    }
  915|   354k|  }
  916|    341|  *nextTokPtr = ptr;
  917|    341|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    341|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  14.2k|}
xmltok.c:little2_scanLt:
  726|  14.5k|               const char **nextTokPtr) {
  727|  14.5k|#  ifdef XML_NS
  728|  14.5k|  int hadColon;
  729|  14.5k|#  endif
  730|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  14.5k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 14.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  14.5k|    }
  |  |  ------------------
  ------------------
  731|  14.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  14.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  14.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.1k, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  8.86k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  8.72k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.28k, False: 12.2k]
  |  |  ------------------
  |  |  111|  8.72k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  2.28k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  2.28k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.28k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 19, False: 2.26k]
  |  |  ------------------
  |  |  112|     19|      *nextTokPtr = ptr;                                                       \
  |  |  113|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     19|    }                                                                          \
  |  |  115|  8.72k|    /* fall through */                                                         \
  |  |  116|  8.72k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.28k, False: 10.2k]
  |  |  ------------------
  |  |  117|  8.72k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.18k, False: 12.3k]
  |  |  ------------------
  |  |  118|  8.72k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  8.72k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  8.72k|    break;                                                                     \
  |  |  120|  8.72k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 14.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 14.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     23|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 23, False: 14.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    828|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 828, False: 13.6k]
  ------------------
  734|    828|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    828|#  define MINBPC(enc) 2
  ------------------
  735|    828|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    828|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    828|    {                                                                          \
  |  |  |  |  135|    828|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    828|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    828|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 826]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|    828|    }
  |  |  ------------------
  ------------------
  736|    826|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    826|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    826|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    801|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 27, False: 799]
  |  |  |  |  |  Branch (737:4): [True: 801, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    199|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 199, False: 627]
  ------------------
  738|    199|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    199|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    199|#  define MINBPC(enc) 2
  ------------------
  739|    600|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 600, False: 226]
  ------------------
  740|    600|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    600|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    600|#  define MINBPC(enc) 2
  ------------------
  741|    826|    }
  742|     27|    *nextTokPtr = ptr;
  743|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  744|  3.46k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.46k, False: 11.0k]
  ------------------
  745|  3.46k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.46k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.46k|#  define MINBPC(enc) 2
  ------------------
  746|  1.43k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.43k, False: 13.0k]
  ------------------
  747|  1.43k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.43k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.43k|#  define MINBPC(enc) 2
  ------------------
  748|      9|  default:
  ------------------
  |  Branch (748:3): [True: 9, False: 14.4k]
  ------------------
  749|      9|    *nextTokPtr = ptr;
  750|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  751|  14.5k|  }
  752|  8.72k|#  ifdef XML_NS
  753|  8.72k|  hadColon = 0;
  754|  8.72k|#  endif
  755|       |  /* we have a start-tag */
  756|  1.20M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  1.20M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.20M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.20M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.8k, False: 1.19M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  5.98M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.19M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.19M, False: 11.8k]
  |  |  ------------------
  |  |   82|  1.19M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.19M|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.19M|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.19M|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 1.19M]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  1.19M|    /* fall through */                                                         \
  |  |   87|  1.19M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.33k, False: 1.20M]
  |  |  ------------------
  |  |   88|  1.19M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 804, False: 1.20M]
  |  |  ------------------
  |  |   89|  1.19M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 226, False: 1.20M]
  |  |  ------------------
  |  |   90|  1.19M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 452, False: 1.20M]
  |  |  ------------------
  |  |   91|  1.19M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 417, False: 1.20M]
  |  |  ------------------
  |  |   92|  1.19M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.19M|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.19M|    break;                                                                     \
  |  |   94|  1.19M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 1.20M]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 1.20M]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 1.20M]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 1.20M]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  1.78k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.78k, False: 1.20M]
  ------------------
  777|  2.99k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.21k, False: 1.20M]
  ------------------
  778|  3.67k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 682, False: 1.20M]
  ------------------
  779|  3.67k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.67k|#  define MINBPC(enc) 2
  ------------------
  780|  5.25k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.25k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.25k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.25k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.58k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.58k, False: 678]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  2.73k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.70k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 652, False: 4.60k]
  |  |  ------------------
  |  |  111|  2.70k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    652|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    652|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    652|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 640]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  2.70k|    /* fall through */                                                         \
  |  |  116|  2.70k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.40k, False: 3.85k]
  |  |  ------------------
  |  |  117|  2.70k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 660, False: 4.59k]
  |  |  ------------------
  |  |  118|  2.70k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.70k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.70k|    break;                                                                     \
  |  |  120|  2.70k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.25k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.25k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.23k]
  |  |  |  |  ------------------
  |  |  |  |  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|    688|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 688, False: 4.57k]
  ------------------
  784|    688|          goto gt;
  785|    202|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 202, False: 5.05k]
  ------------------
  786|    202|          goto sol;
  787|    648|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 648, False: 4.61k]
  ------------------
  788|  1.14k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 493, False: 4.76k]
  ------------------
  789|  1.62k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 484, False: 4.77k]
  ------------------
  790|  1.62k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.62k|#  define MINBPC(enc) 2
  ------------------
  791|  1.62k|          continue;
  792|      7|        default:
  ------------------
  |  Branch (792:9): [True: 7, False: 5.25k]
  ------------------
  793|      7|          *nextTokPtr = ptr;
  794|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  795|  5.25k|        }
  796|  2.70k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.70k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  5.25k|      }
  798|     45|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  3.67k|    }
  800|  4.63k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 4.63k, False: 1.20M]
  ------------------
  801|  5.32k|    gt:
  802|  5.32k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.32k|#  define MINBPC(enc) 2
  ------------------
  803|  5.32k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  5.32k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    314|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 314, False: 1.20M]
  ------------------
  805|    516|    sol:
  806|    516|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    516|#  define MINBPC(enc) 2
  ------------------
  807|    516|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    516|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    516|    {                                                                          \
  |  |  |  |  135|    516|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    516|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    516|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 502]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|    516|    }
  |  |  ------------------
  ------------------
  808|    502|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    502|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    502|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 492, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 479, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     23|        *nextTokPtr = ptr;
  810|     23|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  811|     23|      }
  812|    479|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    479|#  define MINBPC(enc) 2
  ------------------
  813|    479|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    479|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     10|    default:
  ------------------
  |  Branch (814:5): [True: 10, False: 1.20M]
  ------------------
  815|     10|      *nextTokPtr = ptr;
  816|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  817|  1.20M|    }
  818|  1.20M|  }
  819|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  8.72k|}
xmltok.c:little2_scanCdataSection:
  337|    600|                         const char **nextTokPtr) {
  338|    600|  static const char CDATA_LSQB[]
  339|    600|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    600|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    600|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    600|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    600|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    600|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    600|#define ASCII_LSQB 0x5B
  ------------------
  340|    600|  int i;
  341|    600|  UNUSED_P(enc);
  ------------------
  |  |  135|    600|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    600|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    600|    {                                                                          \
  |  |  135|    600|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    600|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    600|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 5, False: 595]
  |  |  ------------------
  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      5|      }                                                                        \
  |  |  138|    600|    }
  ------------------
  344|  4.09k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.50k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.51k, False: 577]
  ------------------
  345|  3.51k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  3.51k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.51k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.50k, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 3.50k, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     18|      *nextTokPtr = ptr;
  347|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  348|     18|    }
  349|  3.51k|  }
  350|    577|  *nextTokPtr = ptr;
  351|    577|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    577|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    595|}
xmltok.c:little2_scanEndTag:
  432|  1.43k|                   const char **nextTokPtr) {
  433|  1.43k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.43k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.43k|    {                                                                          \
  |  |  |  |  135|  1.43k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.43k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.43k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.43k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.43k|    }
  |  |  ------------------
  ------------------
  434|  1.43k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.43k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.43k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.12k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.12k, False: 308]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.09k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.40k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 287, False: 1.14k]
  |  |  ------------------
  |  |  111|  1.40k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    287|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    287|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    287|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 3, False: 284]
  |  |  ------------------
  |  |  112|      3|      *nextTokPtr = ptr;                                                       \
  |  |  113|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      3|    }                                                                          \
  |  |  115|  1.40k|    /* fall through */                                                         \
  |  |  116|  1.40k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 491, False: 940]
  |  |  ------------------
  |  |  117|  1.40k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 631, False: 800]
  |  |  ------------------
  |  |  118|  1.40k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.40k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.40k|    break;                                                                     \
  |  |  120|  1.40k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.43k]
  |  |  |  |  ------------------
  |  |  |  |  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.43k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 1.41k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      6|  default:
  ------------------
  |  Branch (436:3): [True: 6, False: 1.42k]
  ------------------
  437|      6|    *nextTokPtr = ptr;
  438|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  439|  1.43k|  }
  440|  2.87k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.87k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.87k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.87k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.40k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.40k, False: 466]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.51k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.53k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 440, False: 2.43k]
  |  |  ------------------
  |  |   82|  1.53k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    440|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    440|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    440|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 423]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  1.53k|    /* fall through */                                                         \
  |  |   87|  1.53k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 260, False: 2.61k]
  |  |  ------------------
  |  |   88|    909|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 226, False: 2.64k]
  |  |  ------------------
  |  |   89|  1.12k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 215, False: 2.65k]
  |  |  ------------------
  |  |   90|  1.32k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 2.67k]
  |  |  ------------------
  |  |   91|  1.53k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 210, False: 2.66k]
  |  |  ------------------
  |  |   92|  1.53k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.53k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.53k|    break;                                                                     \
  |  |   94|  1.53k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.87k]
  |  |  |  |  ------------------
  |  |  |  |   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.87k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     20|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 2.85k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    212|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 212, False: 2.65k]
  ------------------
  444|    618|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 406, False: 2.46k]
  ------------------
  445|    827|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 209, False: 2.66k]
  ------------------
  446|  1.47k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    827|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    683|#  define MINBPC(enc) 2
  ------------------
  447|  1.47k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.47k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.47k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.45k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.45k, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    201|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 201, False: 1.27k]
  ------------------
  449|    443|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 242, False: 1.22k]
  ------------------
  450|    683|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 240, False: 1.23k]
  ------------------
  451|    683|          break;
  452|    768|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 768, False: 703]
  ------------------
  453|    768|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    768|#  define MINBPC(enc) 2
  ------------------
  454|    768|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    768|#define XML_TOK_END_TAG 5
  ------------------
  455|     20|        default:
  ------------------
  |  Branch (455:9): [True: 20, False: 1.45k]
  ------------------
  456|     20|          *nextTokPtr = ptr;
  457|     20|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  458|  1.47k|        }
  459|  1.47k|      }
  460|     39|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#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.87k]
  ------------------
  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|    466|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 466, False: 2.40k]
  ------------------
  469|    466|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    466|#  define MINBPC(enc) 2
  ------------------
  470|    466|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    466|#define XML_TOK_END_TAG 5
  ------------------
  471|      9|    default:
  ------------------
  |  Branch (471:5): [True: 9, False: 2.86k]
  ------------------
  472|      9|      *nextTokPtr = ptr;
  473|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  474|  2.87k|    }
  475|  2.87k|  }
  476|     67|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.40k|}
xmltok.c:little2_scanAtts:
  573|  2.70k|                 const char **nextTokPtr) {
  574|  2.70k|#  ifdef XML_NS
  575|  2.70k|  int hadColon = 0;
  576|  2.70k|#  endif
  577|   147k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   147k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   147k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   147k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   146k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 146k, False: 334]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  7.42k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.37k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 313, False: 146k]
  |  |  ------------------
  |  |   82|  2.37k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    313|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    313|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    313|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 296]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  2.37k|    /* fall through */                                                         \
  |  |   87|  2.37k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 949, False: 146k]
  |  |  ------------------
  |  |   88|  1.72k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 475, False: 146k]
  |  |  ------------------
  |  |   89|  1.95k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 230, False: 147k]
  |  |  ------------------
  |  |   90|  2.16k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 216, False: 147k]
  |  |  ------------------
  |  |   91|  2.37k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 210, False: 147k]
  |  |  ------------------
  |  |   92|  2.37k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.37k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.37k|    break;                                                                     \
  |  |   94|  2.37k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 147k]
  |  |  |  |  ------------------
  |  |  |  |   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: 147k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     16|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 147k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 147k]
  ------------------
  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|    351|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 351, False: 146k]
  ------------------
  598|    755|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 404, False: 146k]
  ------------------
  599|  1.19k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 435, False: 146k]
  ------------------
  600|  2.24k|      for (;;) {
  601|  2.24k|        int t;
  602|       |
  603|  2.24k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.24k|#  define MINBPC(enc) 2
  ------------------
  604|  2.24k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.24k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.24k|    {                                                                          \
  |  |  |  |  135|  2.24k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.24k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.24k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 45, False: 2.20k]
  |  |  |  |  ------------------
  |  |  |  |  136|     45|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     45|      }                                                                        \
  |  |  |  |  138|  2.24k|    }
  |  |  ------------------
  ------------------
  605|  2.20k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  2.20k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.20k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.18k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.18k, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.20k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.12k, False: 1.07k]
  ------------------
  607|  1.12k|          break;
  608|  1.07k|        switch (t) {
  609|    254|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 254, False: 820]
  ------------------
  610|    573|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 319, False: 755]
  ------------------
  611|  1.05k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 483, False: 591]
  ------------------
  612|  1.05k|          break;
  613|     18|        default:
  ------------------
  |  Branch (613:9): [True: 18, False: 1.05k]
  ------------------
  614|     18|          *nextTokPtr = ptr;
  615|     18|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  616|  1.07k|        }
  617|  1.07k|      }
  618|       |      /* fall through */
  619|   144k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 143k, False: 3.60k]
  ------------------
  620|   144k|      int open;
  621|   144k|#  ifdef XML_NS
  622|   144k|      hadColon = 0;
  623|   144k|#  endif
  624|   145k|      for (;;) {
  625|   145k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   145k|#  define MINBPC(enc) 2
  ------------------
  626|   145k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   145k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   145k|    {                                                                          \
  |  |  |  |  135|   145k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   145k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   145k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 145k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|   145k|    }
  |  |  ------------------
  ------------------
  627|   145k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   145k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   145k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   145k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 145k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   145k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 6.21k, False: 139k]
  |  Branch (628:32): [True: 138k, False: 923]
  ------------------
  629|   144k|          break;
  630|    923|        switch (open) {
  631|    312|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 312, False: 611]
  ------------------
  632|    639|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 327, False: 596]
  ------------------
  633|    899|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 260, False: 663]
  ------------------
  634|    899|          break;
  635|     24|        default:
  ------------------
  |  Branch (635:9): [True: 24, False: 899]
  ------------------
  636|     24|          *nextTokPtr = ptr;
  637|     24|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  638|    923|        }
  639|    923|      }
  640|   144k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   144k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  3.38M|      for (;;) {
  643|  3.38M|        int t;
  644|  3.38M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.38M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.38M|    {                                                                          \
  |  |  |  |  135|  3.38M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.38M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.38M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 66, False: 3.38M]
  |  |  |  |  ------------------
  |  |  |  |  136|     66|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     66|      }                                                                        \
  |  |  |  |  138|  3.38M|    }
  |  |  ------------------
  ------------------
  645|  3.38M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  3.38M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.38M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   765k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 765k, False: 2.62M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  3.38M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 144k, False: 3.24M]
  ------------------
  647|   144k|          break;
  648|  3.24M|        switch (t) {
  649|  95.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: 3.24M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 3.24M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  47.5k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  47.5k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 47.5k, False: 3.19M]
  |  |  |  |  ------------------
  |  |  |  |   50|  47.5k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 47.5k]
  |  |  |  |  ------------------
  |  |  |  |   51|  47.5k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  47.5k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  47.5k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  47.5k|    ptr += n;                                                                  \
  |  |  |  |   57|  47.5k|    break;
  |  |  ------------------
  |  |   63|  47.5k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 6, False: 3.24M]
  |  |  ------------------
  |  |   64|      6|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 3.24M]
  |  |  ------------------
  |  |   65|     12|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 3.24M]
  |  |  ------------------
  |  |   66|     12|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  14.0k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 14.0k, False: 3.22M]
  ------------------
  651|  14.0k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  14.0k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  14.0k|#  define MINBPC(enc) 2
  ------------------
  652|  14.0k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 11, False: 14.0k]
  ------------------
  653|     11|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 6, False: 5]
  ------------------
  654|      6|              *nextTokPtr = ptr;
  655|     11|            return tok;
  656|     11|          }
  657|  14.0k|          break;
  658|  14.0k|        }
  659|  14.0k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 5, False: 3.24M]
  ------------------
  660|      5|          *nextTokPtr = ptr;
  661|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  662|  3.18M|        default:
  ------------------
  |  Branch (662:9): [True: 3.18M, False: 61.5k]
  ------------------
  663|  3.18M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.18M|#  define MINBPC(enc) 2
  ------------------
  664|  3.18M|          break;
  665|  3.24M|        }
  666|  3.24M|      }
  667|   144k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   144k|#  define MINBPC(enc) 2
  ------------------
  668|   144k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   144k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   144k|    {                                                                          \
  |  |  |  |  135|   144k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   144k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   144k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 144k]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|   144k|    }
  |  |  ------------------
  ------------------
  669|   144k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   144k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   144k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   144k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 144k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   140k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 140k, False: 4.16k]
  ------------------
  671|   141k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 1.56k, False: 143k]
  ------------------
  672|   143k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.12k, False: 143k]
  ------------------
  673|   143k|        break;
  674|    373|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 373, False: 144k]
  ------------------
  675|    373|        goto sol;
  676|  1.07k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.07k, False: 143k]
  ------------------
  677|  1.07k|        goto gt;
  678|     31|      default:
  ------------------
  |  Branch (678:7): [True: 31, False: 144k]
  ------------------
  679|     31|        *nextTokPtr = ptr;
  680|     31|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  681|   144k|      }
  682|       |      /* ptr points to closing quote */
  683|   144k|      for (;;) {
  684|   144k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   144k|#  define MINBPC(enc) 2
  ------------------
  685|   144k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   144k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   144k|    {                                                                          \
  |  |  |  |  135|   144k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   144k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   144k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 45, False: 144k]
  |  |  |  |  ------------------
  |  |  |  |  136|     45|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     45|      }                                                                        \
  |  |  |  |  138|   144k|    }
  |  |  ------------------
  ------------------
  686|   144k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   144k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   144k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   143k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 143k, False: 1.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   112k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   142k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.15k, False: 143k]
  |  |  ------------------
  |  |  111|   142k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.15k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.15k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.15k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 5, False: 1.15k]
  |  |  ------------------
  |  |  112|      5|      *nextTokPtr = ptr;                                                       \
  |  |  113|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      5|    }                                                                          \
  |  |  115|   142k|    /* fall through */                                                         \
  |  |  116|   142k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 110k, False: 34.1k]
  |  |  ------------------
  |  |  117|   142k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 30.9k, False: 113k]
  |  |  ------------------
  |  |  118|   142k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   142k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   142k|    break;                                                                     \
  |  |  120|   142k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 144k]
  |  |  |  |  ------------------
  |  |  |  |  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: 144k]
  |  |  |  |  ------------------
  |  |  |  |  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: 144k]
  |  |  |  |  ------------------
  |  |  |  |  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|    594|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 594, False: 143k]
  ------------------
  689|    923|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 329, False: 144k]
  ------------------
  690|  1.27k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 350, False: 143k]
  ------------------
  691|  1.27k|          continue;
  692|    274|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 274, False: 144k]
  ------------------
  693|  1.34k|        gt:
  694|  1.34k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.34k|#  define MINBPC(enc) 2
  ------------------
  695|  1.34k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.34k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    490|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 490, False: 143k]
  ------------------
  697|    863|        sol:
  698|    863|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    863|#  define MINBPC(enc) 2
  ------------------
  699|    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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    863|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 855]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|    863|    }
  |  |  ------------------
  ------------------
  700|    855|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    855|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    855|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 850, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 841, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     14|            *nextTokPtr = ptr;
  702|     14|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  703|     14|          }
  704|    841|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    841|#  define MINBPC(enc) 2
  ------------------
  705|    841|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    841|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      5|        default:
  ------------------
  |  Branch (706:9): [True: 5, False: 144k]
  ------------------
  707|      5|          *nextTokPtr = ptr;
  708|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  709|   144k|        }
  710|   142k|        break;
  711|   144k|      }
  712|   142k|      break;
  713|   143k|    }
  714|   142k|    default:
  ------------------
  |  Branch (714:5): [True: 9, False: 147k]
  ------------------
  715|      9|      *nextTokPtr = ptr;
  716|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  717|   147k|    }
  718|   147k|  }
  719|     89|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     89|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.70k|}
xmltok.c:little2_scanRef:
  545|  35.0k|                const char **nextTokPtr) {
  546|  35.0k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  35.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  35.0k|    {                                                                          \
  |  |  |  |  135|  35.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  35.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  35.0k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 35.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|  35.0k|    }
  |  |  ------------------
  ------------------
  547|  35.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  35.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  35.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  33.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 33.8k, False: 1.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  6.00k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  29.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.17k, False: 33.8k]
  |  |  ------------------
  |  |  111|  29.5k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.17k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.17k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.17k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 1.16k]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  29.5k|    /* fall through */                                                         \
  |  |  116|  29.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.64k, False: 31.4k]
  |  |  ------------------
  |  |  117|  29.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 24.7k, False: 10.3k]
  |  |  ------------------
  |  |  118|  29.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  29.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  29.5k|    break;                                                                     \
  |  |  120|  29.5k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 35.0k]
  |  |  |  |  ------------------
  |  |  |  |  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: 35.0k]
  |  |  |  |  ------------------
  |  |  |  |  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|     13|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13, False: 35.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|     13|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     16|#    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|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|      8|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  5.50k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 5.50k, False: 29.5k]
  ------------------
  550|  5.50k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.50k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.50k|#  define MINBPC(enc) 2
  ------------------
  551|      9|  default:
  ------------------
  |  Branch (551:3): [True: 9, False: 35.0k]
  ------------------
  552|      9|    *nextTokPtr = ptr;
  553|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  554|  35.0k|  }
  555|  48.5k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  48.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  48.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  48.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 44.0k, False: 4.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  77.6k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  19.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 4.52k, False: 44.0k]
  |  |  ------------------
  |  |   82|  19.0k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  4.52k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.52k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.52k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 4.50k]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  19.0k|    /* fall through */                                                         \
  |  |   87|  19.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 12.8k, False: 35.7k]
  |  |  ------------------
  |  |   88|  18.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 847, False: 47.7k]
  |  |  ------------------
  |  |   89|  18.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 426, False: 48.1k]
  |  |  ------------------
  |  |   90|  18.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 259, False: 48.3k]
  |  |  ------------------
  |  |   91|  19.0k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 204, False: 48.3k]
  |  |  ------------------
  |  |   92|  19.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  19.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  19.0k|    break;                                                                     \
  |  |   94|  19.0k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 48.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 48.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     19|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 48.5k]
  |  |  |  |  ------------------
  |  |  |  |   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|  29.4k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 29.4k, False: 19.1k]
  ------------------
  559|  29.4k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  29.4k|#  define MINBPC(enc) 2
  ------------------
  560|  29.4k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  29.4k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     10|    default:
  ------------------
  |  Branch (561:5): [True: 10, False: 48.5k]
  ------------------
  562|     10|      *nextTokPtr = ptr;
  563|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  564|  48.5k|    }
  565|  48.5k|  }
  566|     49|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     49|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  29.5k|}
xmltok.c:little2_scanCharRef:
  514|  5.50k|                    const char **nextTokPtr) {
  515|  5.50k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  5.50k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.50k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 5.50k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  5.50k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  5.50k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.50k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.49k, False: 1]
  |  |  |  |  |  Branch (739:52): [True: 4.11k, False: 1.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  4.11k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.11k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.11k|#  define MINBPC(enc) 2
  ------------------
  518|  1.38k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.38k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.38k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.38k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.38k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.38k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.38k, False: 3]
  ------------------
  520|  1.38k|      break;
  521|      3|    default:
  ------------------
  |  Branch (521:5): [True: 3, False: 1.38k]
  ------------------
  522|      3|      *nextTokPtr = ptr;
  523|      3|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  524|  1.38k|    }
  525|  4.84k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.38k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.47k|#  define MINBPC(enc) 2
  ------------------
  526|  4.84k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.84k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.84k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.82k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.82k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  3.47k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.47k, False: 1.37k]
  ------------------
  528|  3.47k|        break;
  529|  1.35k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.35k, False: 3.49k]
  ------------------
  530|  1.35k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.35k|#  define MINBPC(enc) 2
  ------------------
  531|  1.35k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.35k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     23|      default:
  ------------------
  |  Branch (532:7): [True: 23, False: 4.82k]
  ------------------
  533|     23|        *nextTokPtr = ptr;
  534|     23|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  535|  4.84k|      }
  536|  4.84k|    }
  537|  1.38k|  }
  538|     10|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  5.50k|}
xmltok.c:little2_scanHexCharRef:
  483|  4.11k|                       const char **nextTokPtr) {
  484|  4.11k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.11k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.11k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.11k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.11k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.11k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.11k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.11k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.10k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.10k, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  1.59k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 1.59k, False: 2.52k]
  ------------------
  487|  4.10k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.50k, False: 1.60k]
  ------------------
  488|  4.10k|      break;
  489|     13|    default:
  ------------------
  |  Branch (489:5): [True: 13, False: 4.10k]
  ------------------
  490|     13|      *nextTokPtr = ptr;
  491|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  492|  4.11k|    }
  493|  14.8k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.10k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  10.7k|#  define MINBPC(enc) 2
  ------------------
  494|  14.8k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  14.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  14.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 14.8k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  5.75k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 5.75k, False: 9.12k]
  ------------------
  496|  10.7k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 5.04k, False: 9.83k]
  ------------------
  497|  10.7k|        break;
  498|  4.05k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 4.05k, False: 10.8k]
  ------------------
  499|  4.05k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.05k|#  define MINBPC(enc) 2
  ------------------
  500|  4.05k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.05k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     28|      default:
  ------------------
  |  Branch (501:7): [True: 28, False: 14.8k]
  ------------------
  502|     28|        *nextTokPtr = ptr;
  503|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  504|  14.8k|      }
  505|  14.8k|    }
  506|  4.10k|  }
  507|     21|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.11k|}
xmltok.c:little2_cdataSectionTok:
  356|  23.2k|                        const char **nextTokPtr) {
  357|  23.2k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 154, False: 23.0k]
  ------------------
  358|    154|    return XML_TOK_NONE;
  ------------------
  |  |   51|    154|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  23.0k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  23.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  23.0k|    size_t n = end - ptr;
  361|  23.0k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  23.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 10.0k, False: 13.0k]
  ------------------
  362|  10.0k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  10.0k|#  define MINBPC(enc) 2
  ------------------
  363|  10.0k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 17, False: 10.0k]
  ------------------
  364|     17|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  10.0k|      end = ptr + n;
  366|  10.0k|    }
  367|  23.0k|  }
  368|  23.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  23.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  23.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 18.8k, False: 4.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  4.80k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 4.80k, False: 18.2k]
  ------------------
  370|  4.80k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.80k|#  define MINBPC(enc) 2
  ------------------
  371|  4.80k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.80k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.80k|    {                                                                          \
  |  |  |  |  135|  4.80k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.80k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.80k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 4.80k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  4.80k|    }
  |  |  ------------------
  ------------------
  372|  4.80k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  4.80k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.80k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.34k, False: 1.45k]
  |  |  |  |  |  Branch (739:52): [True: 1.94k, False: 1.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  2.85k|      break;
  374|  1.94k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.94k|#  define MINBPC(enc) 2
  ------------------
  375|  1.94k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.94k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.94k|    {                                                                          \
  |  |  |  |  135|  1.94k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.94k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.94k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 1.94k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  1.94k|    }
  |  |  ------------------
  ------------------
  376|  1.94k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.94k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.94k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.24k, False: 705]
  |  |  |  |  |  Branch (739:52): [True: 271, False: 969]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  1.67k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.67k|#  define MINBPC(enc) 2
  ------------------
  378|  1.67k|      break;
  379|  1.67k|    }
  380|    271|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    271|#  define MINBPC(enc) 2
  ------------------
  381|    271|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    271|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  10.1k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 10.1k, False: 12.9k]
  ------------------
  383|  10.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.1k|#  define MINBPC(enc) 2
  ------------------
  384|  10.1k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  10.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  10.1k|    {                                                                          \
  |  |  |  |  135|  10.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  10.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  10.1k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 17, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     17|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     17|      }                                                                        \
  |  |  |  |  138|  10.1k|    }
  |  |  ------------------
  ------------------
  385|  10.0k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  10.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.42k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.42k, False: 3.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 421, False: 9.66k]
  ------------------
  386|    421|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    421|#  define MINBPC(enc) 2
  ------------------
  387|  10.0k|    *nextTokPtr = ptr;
  388|  10.0k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  1.84k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 1.84k, False: 21.2k]
  ------------------
  390|  1.84k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.84k|#  define MINBPC(enc) 2
  ------------------
  391|  1.84k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.84k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  4.46k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 23.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: 23.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.22k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.16k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.22k, False: 20.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.22k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 61, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.16k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     61|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.16k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.16k|#    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.16k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.16k|    break;
  |  |  ------------------
  |  |   63|  2.16k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 39, False: 23.0k]
  |  |  ------------------
  |  |   64|     39|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 23.0k]
  |  |  ------------------
  |  |   65|     50|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 23.0k]
  |  |  ------------------
  |  |   66|     50|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     50|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     50|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  4.02k|  default:
  ------------------
  |  Branch (393:3): [True: 4.02k, False: 19.0k]
  ------------------
  394|  4.02k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.02k|#  define MINBPC(enc) 2
  ------------------
  395|  4.02k|    break;
  396|  23.0k|  }
  397|   865k|  while (HAS_CHAR(enc, ptr, end)) {
  398|   865k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   865k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   865k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  37.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 37.1k, False: 828k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 865k]
  |  |  ------------------
  |  |  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: 865k]
  |  |  ------------------
  |  |  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|  45.8k|      LEAD_CASE(4)
  ------------------
  |  |  400|  45.8k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 45.8k, False: 819k]
  |  |  ------------------
  |  |  401|  45.8k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  45.8k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 55, False: 45.8k]
  |  |  ------------------
  |  |  402|     55|      *nextTokPtr = ptr;                                                       \
  |  |  403|     55|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     55|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     55|    }                                                                          \
  |  |  405|  45.8k|    ptr += n;                                                                  \
  |  |  406|  45.8k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     37|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 37, False: 865k]
  ------------------
  412|     37|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 865k]
  ------------------
  413|     43|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 6, False: 865k]
  ------------------
  414|  5.72k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 5.67k, False: 859k]
  ------------------
  415|  7.15k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.43k, False: 863k]
  ------------------
  416|  10.5k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 3.36k, False: 861k]
  ------------------
  417|  10.5k|      *nextTokPtr = ptr;
  418|  10.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  10.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   808k|    default:
  ------------------
  |  Branch (419:5): [True: 808k, False: 56.4k]
  ------------------
  420|   808k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   808k|#  define MINBPC(enc) 2
  ------------------
  421|   808k|      break;
  422|   865k|    }
  423|   865k|  }
  424|    138|  *nextTokPtr = ptr;
  425|    138|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    138|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  10.7k|}
xmltok.c:little2_attributeValueTok:
 1262|  68.4k|                          const char **nextTokPtr) {
 1263|  68.4k|  const char *start;
 1264|  68.4k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 1.60k, False: 66.8k]
  ------------------
 1265|  1.60k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.60k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  66.8k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  66.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  66.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  66.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 66.8k]
  ------------------
 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|  66.8k|  start = ptr;
 1275|  1.50M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.50M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.50M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.50M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   132k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 132k, False: 1.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|      0|      LEAD_CASE(2)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 1.50M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 1.50M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  32.0k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  32.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 32.0k, False: 1.47M]
  |  |  ------------------
  |  | 1279|  32.0k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  32.0k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  19.3k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 19.3k, False: 1.48M]
  ------------------
 1286|  19.3k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 10.0k, False: 9.26k]
  ------------------
 1287|  10.0k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  10.0k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  10.0k|#  define MINBPC(enc) 2
  ------------------
 1288|  9.26k|      *nextTokPtr = ptr;
 1289|  9.26k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  9.26k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 1.50M]
  ------------------
 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|  19.2k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 19.2k, False: 1.48M]
  ------------------
 1295|  19.2k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 10.7k, False: 8.55k]
  ------------------
 1296|  10.7k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  10.7k|#  define MINBPC(enc) 2
  ------------------
 1297|  10.7k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  10.7k|      }
 1299|  8.55k|      *nextTokPtr = ptr;
 1300|  8.55k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  8.55k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  18.8k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 18.8k, False: 1.48M]
  ------------------
 1302|  18.8k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 11.1k, False: 7.62k]
  ------------------
 1303|  11.1k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  11.1k|#  define MINBPC(enc) 2
  ------------------
 1304|  11.1k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  11.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  11.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  11.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 215, False: 10.9k]
  ------------------
 1305|    215|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    215|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  10.9k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  10.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.58k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.58k, False: 4.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 2.39k, False: 8.57k]
  ------------------
 1307|  2.39k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.39k|#  define MINBPC(enc) 2
  ------------------
 1308|  10.9k|        *nextTokPtr = ptr;
 1309|  10.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  11.1k|      }
 1311|  7.62k|      *nextTokPtr = ptr;
 1312|  7.62k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.62k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  8.49k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 8.49k, False: 1.49M]
  ------------------
 1314|  8.49k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 4.73k, False: 3.75k]
  ------------------
 1315|  4.73k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.73k|#  define MINBPC(enc) 2
  ------------------
 1316|  4.73k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  4.73k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  4.73k|      }
 1318|  3.75k|      *nextTokPtr = ptr;
 1319|  3.75k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.75k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  1.40M|    default:
  ------------------
  |  Branch (1320:5): [True: 1.40M, False: 98.0k]
  ------------------
 1321|  1.40M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.40M|#  define MINBPC(enc) 2
  ------------------
 1322|  1.40M|      break;
 1323|  1.50M|    }
 1324|  1.50M|  }
 1325|    934|  *nextTokPtr = ptr;
 1326|    934|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    934|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  66.8k|}
xmltok.c:little2_entityValueTok:
 1331|  52.5k|                       const char **nextTokPtr) {
 1332|  52.5k|  const char *start;
 1333|  52.5k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.73k, False: 50.8k]
  ------------------
 1334|  1.73k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.73k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  50.8k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  50.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  50.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  50.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 50.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|  50.8k|  start = ptr;
 1344|  5.60M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  5.60M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.60M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.60M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   136k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 136k, False: 5.46M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 5.60M]
  |  |  ------------------
  |  | 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: 5.60M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   239k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   239k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 239k, False: 5.36M]
  |  |  ------------------
  |  | 1348|   239k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   239k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  2.88k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 2.88k, False: 5.60M]
  ------------------
 1355|  2.88k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 1.52k, False: 1.36k]
  ------------------
 1356|  1.52k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.52k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.52k|#  define MINBPC(enc) 2
  ------------------
 1357|  1.36k|      *nextTokPtr = ptr;
 1358|  1.36k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.36k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      7|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 7, False: 5.60M]
  ------------------
 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|      2|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 2, False: 3]
  ------------------
 1363|      5|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  8.45k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 8.45k, False: 5.59M]
  ------------------
 1367|  8.45k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 4.43k, False: 4.02k]
  ------------------
 1368|  4.43k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.43k|#  define MINBPC(enc) 2
  ------------------
 1369|  4.43k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.43k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  4.43k|      }
 1371|  4.02k|      *nextTokPtr = ptr;
 1372|  4.02k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.02k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  38.5k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 38.5k, False: 5.56M]
  ------------------
 1374|  38.5k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 20.3k, False: 18.1k]
  ------------------
 1375|  20.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  20.3k|#  define MINBPC(enc) 2
  ------------------
 1376|  20.3k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  20.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  20.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  20.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 424, False: 19.9k]
  ------------------
 1377|    424|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    424|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  19.9k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  19.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  19.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.45k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.45k, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 552, False: 19.3k]
  ------------------
 1379|    552|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    552|#  define MINBPC(enc) 2
  ------------------
 1380|  19.9k|        *nextTokPtr = ptr;
 1381|  19.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  19.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  20.3k|      }
 1383|  18.1k|      *nextTokPtr = ptr;
 1384|  18.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  18.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  5.31M|    default:
  ------------------
  |  Branch (1385:5): [True: 5.31M, False: 289k]
  ------------------
 1386|  5.31M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.31M|#  define MINBPC(enc) 2
  ------------------
 1387|  5.31M|      break;
 1388|  5.60M|    }
 1389|  5.60M|  }
 1390|    928|  *nextTokPtr = ptr;
 1391|    928|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    928|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  50.8k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  15.5k|                         const char *end1, const char *ptr2) {
 1716|  15.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  15.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  69.7k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  54.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 60.7k, False: 8.99k]
  ------------------
 1718|  60.7k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|  60.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 35, False: 60.7k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     35|      return 0; /* LCOV_EXCL_LINE */
 1725|     35|    }
 1726|  60.7k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|  60.7k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  60.7k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 60.7k, False: 33]
  |  |  |  |  |  Branch (739:52): [True: 54.2k, False: 6.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  6.55k|      return 0;
 1728|  60.7k|  }
 1729|  8.99k|  return ptr1 == end1;
 1730|  15.5k|}
xmltok.c:little2_nameLength:
 1733|  12.0k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  12.0k|  const char *start = ptr;
 1735|  1.22M|  for (;;) {
 1736|  1.22M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.22M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.22M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  23.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 23.8k, False: 1.19M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|      0|      LEAD_CASE(2)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 1.22M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1742|      0|      LEAD_CASE(3)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 1.22M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 1.22M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  1.19M|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 1.19M, False: 23.8k]
  ------------------
 1746|  1.20M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 7.28k, False: 1.21M]
  ------------------
 1747|  1.20M|#  ifdef XML_NS
 1748|  1.20M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 1.22M]
  ------------------
 1749|  1.20M|#  endif
 1750|  1.20M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.93k, False: 1.21M]
  ------------------
 1751|  1.20M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 27, False: 1.22M]
  ------------------
 1752|  1.20M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 299, False: 1.22M]
  ------------------
 1753|  1.20M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 221, False: 1.22M]
  ------------------
 1754|  1.20M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.20M|#  define MINBPC(enc) 2
  ------------------
 1755|  1.20M|      break;
 1756|  12.0k|    default:
  ------------------
  |  Branch (1756:5): [True: 12.0k, False: 1.20M]
  ------------------
 1757|  12.0k|      return (int)(ptr - start);
 1758|  1.22M|    }
 1759|  1.22M|  }
 1760|  12.0k|}
xmltok.c:little2_getAtts:
 1510|  8.10k|                ATTRIBUTE *atts) {
 1511|  8.10k|  enum { other, inName, inValue } state = inName;
 1512|  8.10k|  int nAtts = 0;
 1513|  8.10k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  6.75M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.10k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  6.74M|#  define MINBPC(enc) 2
  ------------------
 1517|  6.75M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.75M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.75M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.54M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.54M, False: 4.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 6.75M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 6.75M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1532|  53.4k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  53.4k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 53.4k, False: 6.69M]
  |  |  ------------------
  |  | 1528|  53.4k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  53.4k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 53.4k]
  |  |  |  |  ------------------
  |  |  |  | 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|  53.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  53.4k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  4.15M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 4.15M, False: 2.59M]
  ------------------
 1535|  4.46M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 304k, False: 6.44M]
  ------------------
 1536|  4.55M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 94.3k, False: 6.65M]
  ------------------
 1537|  4.55M|      START_NAME
  ------------------
  |  | 1519|  4.55M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 282k, False: 4.27M]
  |  |  ------------------
  |  | 1520|   282k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 144k, False: 138k]
  |  |  ------------------
  |  | 1521|   144k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   144k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   144k|      }                                                                        \
  |  | 1524|   282k|      state = inName;                                                          \
  |  | 1525|   282k|    }
  ------------------
 1538|  4.55M|      break;
 1539|      0|#  undef START_NAME
 1540|  23.0k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 23.0k, False: 6.72M]
  ------------------
 1541|  23.0k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 9.99k, False: 13.1k]
  ------------------
 1542|  9.99k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 6.47k, False: 3.52k]
  ------------------
 1543|  6.47k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.47k|#  define MINBPC(enc) 2
  ------------------
 1544|  9.99k|        state = inValue;
 1545|  9.99k|        open = BT_QUOT;
 1546|  13.1k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 9.99k, False: 3.10k]
  ------------------
 1547|  9.99k|        state = other;
 1548|  9.99k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 6.47k, False: 3.52k]
  ------------------
 1549|  6.47k|          atts[nAtts].valueEnd = ptr;
 1550|  9.99k|        nAtts++;
 1551|  9.99k|      }
 1552|  23.0k|      break;
 1553|   550k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 550k, False: 6.20M]
  ------------------
 1554|   550k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 272k, False: 277k]
  ------------------
 1555|   272k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 138k, False: 134k]
  ------------------
 1556|   138k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   138k|#  define MINBPC(enc) 2
  ------------------
 1557|   272k|        state = inValue;
 1558|   272k|        open = BT_APOS;
 1559|   277k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 272k, False: 4.57k]
  ------------------
 1560|   272k|        state = other;
 1561|   272k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 138k, False: 134k]
  ------------------
 1562|   138k|          atts[nAtts].valueEnd = ptr;
 1563|   272k|        nAtts++;
 1564|   272k|      }
 1565|   550k|      break;
 1566|  10.8k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 10.8k, False: 6.74M]
  ------------------
 1567|  10.8k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 10.5k, False: 283]
  ------------------
 1568|  10.5k|        atts[nAtts].normalized = 0;
 1569|  10.8k|      break;
 1570|   758k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 758k, False: 5.99M]
  ------------------
 1571|   758k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 1.89k, False: 756k]
  ------------------
 1572|  1.89k|        state = other;
 1573|   756k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 477k, False: 279k]
  |  Branch (1573:36): [True: 242k, False: 234k]
  |  Branch (1573:55): [True: 119k, False: 123k]
  ------------------
 1574|   756k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 21.4k, False: 97.8k]
  ------------------
 1575|   119k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|  97.8k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  97.8k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 97.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   217k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 4.60k, False: 93.1k]
  ------------------
 1576|   119k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|  93.1k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  93.1k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 89.1k, False: 4.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   212k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 49.2k, False: 43.9k]
  ------------------
 1577|   119k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  43.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  43.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  39.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 39.9k, False: 4.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 39.4k, False: 4.46k]
  ------------------
 1578|   114k|        atts[nAtts].normalized = 0;
 1579|   758k|      break;
 1580|   113k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 113k, False: 6.63M]
  ------------------
 1581|   129k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 16.0k, False: 6.73M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   129k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.30k, False: 127k]
  ------------------
 1585|  2.30k|        state = other;
 1586|   127k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 123k, False: 3.79k]
  |  Branch (1586:36): [True: 73.9k, False: 49.6k]
  ------------------
 1587|  73.9k|        atts[nAtts].normalized = 0;
 1588|   129k|      break;
 1589|   128k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 128k, False: 6.62M]
  ------------------
 1590|   157k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 28.5k, False: 6.72M]
  ------------------
 1591|   157k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.10k, False: 149k]
  ------------------
 1592|  8.10k|        return nAtts;
 1593|   149k|      break;
 1594|   512k|    default:
  ------------------
  |  Branch (1594:5): [True: 512k, False: 6.23M]
  ------------------
 1595|   512k|      break;
 1596|  6.75M|    }
 1597|  6.75M|  }
 1598|       |  /* not reached */
 1599|  8.10k|}
xmltok.c:little2_charRefNumber:
 1602|  4.40k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  4.40k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  4.40k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.40k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  4.40k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  4.40k|#  define MINBPC(enc) 2
  ------------------
 1607|  4.40k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  4.40k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.40k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.40k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.52k, False: 882]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  15.9k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  3.52k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  15.9k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  15.9k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 15.9k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.50k, False: 12.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  12.4k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  12.4k|#  define MINBPC(enc) 2
  ------------------
 1610|  12.4k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  12.4k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  12.4k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 12.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  12.4k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 12.4k]
  ------------------
 1612|    659|      case ASCII_0:
  ------------------
  |  |   90|    659|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 659, False: 11.7k]
  ------------------
 1613|  1.27k|      case ASCII_1:
  ------------------
  |  |   91|  1.27k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 614, False: 11.8k]
  ------------------
 1614|  1.90k|      case ASCII_2:
  ------------------
  |  |   92|  1.90k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 633, False: 11.8k]
  ------------------
 1615|  2.46k|      case ASCII_3:
  ------------------
  |  |   93|  2.46k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 557, False: 11.8k]
  ------------------
 1616|  2.98k|      case ASCII_4:
  ------------------
  |  |   94|  2.98k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 524, False: 11.9k]
  ------------------
 1617|  3.90k|      case ASCII_5:
  ------------------
  |  |   95|  3.90k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 920, False: 11.5k]
  ------------------
 1618|  4.71k|      case ASCII_6:
  ------------------
  |  |   96|  4.71k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 809, False: 11.6k]
  ------------------
 1619|  5.22k|      case ASCII_7:
  ------------------
  |  |   97|  5.22k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 510, False: 11.9k]
  ------------------
 1620|  5.63k|      case ASCII_8:
  ------------------
  |  |   98|  5.63k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 407, False: 12.0k]
  ------------------
 1621|  6.03k|      case ASCII_9:
  ------------------
  |  |   99|  6.03k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 405, False: 12.0k]
  ------------------
 1622|  6.03k|        result <<= 4;
 1623|  6.03k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  6.03k|#define ASCII_0 0x30
  ------------------
 1624|  6.03k|        break;
 1625|    386|      case ASCII_A:
  ------------------
  |  |   36|    386|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 386, False: 12.0k]
  ------------------
 1626|    770|      case ASCII_B:
  ------------------
  |  |   37|    770|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 384, False: 12.0k]
  ------------------
 1627|  1.12k|      case ASCII_C:
  ------------------
  |  |   38|  1.12k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 355, False: 12.0k]
  ------------------
 1628|  1.53k|      case ASCII_D:
  ------------------
  |  |   39|  1.53k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 408, False: 12.0k]
  ------------------
 1629|  1.82k|      case ASCII_E:
  ------------------
  |  |   40|  1.82k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 294, False: 12.1k]
  ------------------
 1630|  2.78k|      case ASCII_F:
  ------------------
  |  |   41|  2.78k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 955, False: 11.4k]
  ------------------
 1631|  2.78k|        result <<= 4;
 1632|  2.78k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  2.78k|#define ASCII_A 0x41
  ------------------
 1633|  2.78k|        break;
 1634|  1.08k|      case ASCII_a:
  ------------------
  |  |   63|  1.08k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 1.08k, False: 11.3k]
  ------------------
 1635|  1.36k|      case ASCII_b:
  ------------------
  |  |   64|  1.36k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 278, False: 12.1k]
  ------------------
 1636|  2.12k|      case ASCII_c:
  ------------------
  |  |   65|  2.12k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 761, False: 11.6k]
  ------------------
 1637|  2.66k|      case ASCII_d:
  ------------------
  |  |   66|  2.66k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 537, False: 11.9k]
  ------------------
 1638|  3.25k|      case ASCII_e:
  ------------------
  |  |   67|  3.25k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 599, False: 11.8k]
  ------------------
 1639|  3.62k|      case ASCII_f:
  ------------------
  |  |   68|  3.62k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 370, False: 12.0k]
  ------------------
 1640|  3.62k|        result <<= 4;
 1641|  3.62k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.62k|#define ASCII_a 0x61
  ------------------
 1642|  3.62k|        break;
 1643|  12.4k|      }
 1644|  12.4k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 16, False: 12.4k]
  ------------------
 1645|     16|        return -1;
 1646|  12.4k|    }
 1647|  3.52k|  } else {
 1648|  3.94k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  3.94k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.94k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.94k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 879, False: 3.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.06k|#  define MINBPC(enc) 2
  ------------------
 1649|  3.06k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  3.06k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.06k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 3.06k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  3.06k|      result *= 10;
 1651|  3.06k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.06k|#define ASCII_0 0x30
  ------------------
 1652|  3.06k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 3, False: 3.06k]
  ------------------
 1653|      3|        return -1;
 1654|  3.06k|    }
 1655|    882|  }
 1656|  4.38k|  return checkCharRefNumber(result);
 1657|  4.40k|}
xmltok.c:little2_predefinedEntityName:
 1661|  16.9k|                             const char *end) {
 1662|  16.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  16.9k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  16.9k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|  16.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 9.97k, False: 6.94k]
  ------------------
 1664|  1.48k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.48k, False: 15.4k]
  ------------------
 1665|  1.48k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.48k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.48k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.14k, False: 339]
  |  |  |  |  |  Branch (739:52): [True: 833, False: 315]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    833|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    833|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    833|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 341, False: 492]
  |  |  |  |  |  Branch (738:35): [True: 517, False: 316]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    402|      case ASCII_l:
  ------------------
  |  |   74|    402|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 402, False: 431]
  ------------------
 1668|    402|        return ASCII_LT;
  ------------------
  |  |  111|    402|#define ASCII_LT 0x3C
  ------------------
 1669|     90|      case ASCII_g:
  ------------------
  |  |   69|     90|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 90, False: 743]
  ------------------
 1670|     90|        return ASCII_GT;
  ------------------
  |  |  113|     90|#define ASCII_GT 0x3E
  ------------------
 1671|    833|      }
 1672|    833|    }
 1673|    995|    break;
 1674|  1.97k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.97k, False: 14.9k]
  ------------------
 1675|  1.97k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.97k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.97k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.61k, False: 362]
  |  |  |  |  |  Branch (739:52): [True: 1.35k, False: 259]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.35k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.35k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.35k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.35k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.35k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.04k, False: 306]
  |  |  |  |  |  Branch (739:52): [True: 609, False: 440]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    609|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    609|#  define MINBPC(enc) 2
  ------------------
 1679|    609|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    609|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    609|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 412, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 202, False: 210]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    202|          return ASCII_AMP;
  ------------------
  |  |  105|    202|#define ASCII_AMP 0x26
  ------------------
 1681|    609|      }
 1682|  1.35k|    }
 1683|  1.77k|    break;
 1684|  3.48k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.48k, False: 13.4k]
  ------------------
 1685|  3.48k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.48k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.48k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 267, False: 3.21k]
  |  |  |  |  |  Branch (738:35): [True: 3.23k, False: 256]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.60k|    case ASCII_q:
  ------------------
  |  |   79|  1.60k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.60k, False: 1.88k]
  ------------------
 1687|  1.60k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.60k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.60k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.60k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.60k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.35k, False: 242]
  |  |  |  |  |  Branch (739:52): [True: 1.15k, False: 204]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.15k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.15k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.15k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.15k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.15k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 958, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 705, False: 253]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    705|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    705|#  define MINBPC(enc) 2
  ------------------
 1692|    705|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    705|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    705|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 506, False: 199]
  |  |  |  |  |  Branch (739:52): [True: 298, False: 208]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    298|            return ASCII_QUOT;
  ------------------
  |  |  104|    298|#define ASCII_QUOT 0x22
  ------------------
 1694|    705|        }
 1695|  1.15k|      }
 1696|  1.30k|      break;
 1697|  1.61k|    case ASCII_a:
  ------------------
  |  |   63|  1.61k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.61k, False: 1.86k]
  ------------------
 1698|  1.61k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.61k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.61k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  1.61k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.61k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.41k, False: 200]
  |  |  |  |  |  Branch (739:52): [True: 1.05k, False: 359]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.05k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.05k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.05k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.05k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.05k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 852, False: 207]
  |  |  |  |  |  Branch (739:52): [True: 646, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    646|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    646|#  define MINBPC(enc) 2
  ------------------
 1703|    646|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|    646|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    646|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 432, False: 214]
  |  |  |  |  |  Branch (739:52): [True: 228, False: 204]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    228|            return ASCII_APOS;
  ------------------
  |  |  106|    228|#define ASCII_APOS 0x27
  ------------------
 1705|    646|        }
 1706|  1.05k|      }
 1707|  1.39k|      break;
 1708|  3.48k|    }
 1709|  16.9k|  }
 1710|  15.7k|  return 0;
 1711|  16.9k|}
xmltok.c:little2_updatePosition:
 1779|  3.52k|                       POSITION *pos) {
 1780|  3.95M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  3.95M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.95M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.95M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   273k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 273k, False: 3.68M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 3.95M]
  |  |  ------------------
  |  | 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.95M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   130k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   130k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 130k, False: 3.82M]
  |  |  ------------------
  |  | 1784|   130k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   130k|    pos->columnNumber++;                                                       \
  |  | 1786|   130k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  11.0k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 11.0k, False: 3.94M]
  ------------------
 1792|  11.0k|      pos->columnNumber = 0;
 1793|  11.0k|      pos->lineNumber++;
 1794|  11.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  11.0k|#  define MINBPC(enc) 2
  ------------------
 1795|  11.0k|      break;
 1796|  26.0k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 26.0k, False: 3.93M]
  ------------------
 1797|  26.0k|      pos->lineNumber++;
 1798|  26.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  26.0k|#  define MINBPC(enc) 2
  ------------------
 1799|  26.0k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  26.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  52.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  26.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 25.9k, False: 42]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  25.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  25.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 17.0k, False: 8.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.93k, False: 24.0k]
  ------------------
 1800|  1.93k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.93k|#  define MINBPC(enc) 2
  ------------------
 1801|  26.0k|      pos->columnNumber = 0;
 1802|  26.0k|      break;
 1803|  3.78M|    default:
  ------------------
  |  Branch (1803:5): [True: 3.78M, False: 167k]
  ------------------
 1804|  3.78M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.78M|#  define MINBPC(enc) 2
  ------------------
 1805|  3.78M|      pos->columnNumber++;
 1806|  3.78M|      break;
 1807|  3.95M|    }
 1808|  3.95M|  }
 1809|  3.52k|}
xmltok.c:little2_isPublicId:
 1450|  1.16k|                   const char **badPtr) {
 1451|  1.16k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.16k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.16k|  end -= MINBPC(enc);
  ------------------
  |  |  783|  1.16k|#  define MINBPC(enc) 2
  ------------------
 1453|  10.4k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  10.4k|#  define MINBPC(enc) 2
  ------------------
 1454|  10.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  10.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.4k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    391|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 391, False: 10.1k]
  ------------------
 1456|  1.09k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 708, False: 9.78k]
  ------------------
 1457|  1.38k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 281, False: 10.2k]
  ------------------
 1458|  1.73k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 351, False: 10.1k]
  ------------------
 1459|  1.92k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 196, False: 10.2k]
  ------------------
 1460|  2.41k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 484, False: 10.0k]
  ------------------
 1461|  3.27k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 860, False: 9.63k]
  ------------------
 1462|  3.49k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 221, False: 10.2k]
  ------------------
 1463|  4.24k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 756, False: 9.73k]
  ------------------
 1464|  4.51k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 266, False: 10.2k]
  ------------------
 1465|  4.74k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 230, False: 10.2k]
  ------------------
 1466|  5.00k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 258, False: 10.2k]
  ------------------
 1467|  5.25k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 249, False: 10.2k]
  ------------------
 1468|  5.56k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 314, False: 10.1k]
  ------------------
 1469|  5.80k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 244, False: 10.2k]
  ------------------
 1470|  6.23k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 426, False: 10.0k]
  ------------------
 1471|  6.61k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 375, False: 10.1k]
  ------------------
 1472|  6.92k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 315, False: 10.1k]
  ------------------
 1473|  6.92k|#  ifdef XML_NS
 1474|  6.92k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 10.4k]
  ------------------
 1475|  6.92k|#  endif
 1476|  6.92k|      break;
 1477|    250|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 250, False: 10.2k]
  ------------------
 1478|    250|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|    250|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    250|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 250, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 249]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    249|      break;
 1483|    277|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 277, False: 10.2k]
  ------------------
 1484|  1.56k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 1.28k, False: 9.20k]
  ------------------
 1485|  1.56k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|  1.56k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.56k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.56k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 1.55k, False: 8]
  ------------------
 1486|  1.55k|        break;
 1487|       |      /* fall through */
 1488|  1.76k|    default:
  ------------------
  |  Branch (1488:5): [True: 1.75k, False: 8.73k]
  ------------------
 1489|  1.76k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.76k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.76k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.73k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    280|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 280, False: 1.48k]
  ------------------
 1491|  1.72k|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 1.44k, False: 318]
  ------------------
 1492|  1.72k|        break;
 1493|     38|      default:
  ------------------
  |  Branch (1493:7): [True: 38, False: 1.72k]
  ------------------
 1494|     38|        *badPtr = ptr;
 1495|     38|        return 0;
 1496|  1.76k|      }
 1497|  1.72k|      break;
 1498|  10.4k|    }
 1499|  10.4k|  }
 1500|  1.12k|  return 1;
 1501|  1.16k|}
xmltok.c:big2_prologTok:
 1018|   137k|                  const char **nextTokPtr) {
 1019|   137k|  int tok;
 1020|   137k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 326, False: 137k]
  ------------------
 1021|    326|    return XML_TOK_NONE;
  ------------------
  |  |   51|    326|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|   137k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|   137k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|   137k|    size_t n = end - ptr;
 1024|   137k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|   137k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 43.9k, False: 93.2k]
  ------------------
 1025|  43.9k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  43.9k|#  define MINBPC(enc) 2
  ------------------
 1026|  43.9k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 23, False: 43.9k]
  ------------------
 1027|     23|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  43.9k|      end = ptr + n;
 1029|  43.9k|    }
 1030|   137k|  }
 1031|   137k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   137k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   137k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   133k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 133k, False: 3.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|    820|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 820, False: 136k]
  ------------------
 1033|    820|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    820|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    820|#  define MINBPC(enc) 2
  ------------------
 1034|  7.98k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 7.98k, False: 129k]
  ------------------
 1035|  7.98k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.98k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.98k|#  define MINBPC(enc) 2
  ------------------
 1036|  13.5k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 13.5k, False: 123k]
  ------------------
 1037|  13.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.5k|#  define MINBPC(enc) 2
  ------------------
 1038|  13.5k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.5k|    {                                                                          \
  |  |  |  |  135|  13.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  13.5k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 13.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  13.5k|    }
  |  |  ------------------
  ------------------
 1039|  13.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  13.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  13.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 12, False: 13.4k]
  |  |  |  |  |  Branch (870:4): [True: 12.0k, False: 1.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  6.68k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 6.68k, False: 6.82k]
  ------------------
 1041|  6.68k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  6.68k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  6.68k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.58k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.58k, False: 10.9k]
  ------------------
 1043|  2.58k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.58k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.58k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.29k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.29k, False: 12.2k]
  ------------------
 1045|  2.73k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.44k, False: 12.0k]
  ------------------
 1046|  4.21k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.47k, False: 12.0k]
  ------------------
 1047|  4.21k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 13.5k]
  ------------------
 1048|  4.21k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 13.5k]
  ------------------
 1049|  4.23k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 19, False: 13.4k]
  ------------------
 1050|  4.23k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  4.23k|#  define MINBPC(enc) 2
  ------------------
 1051|  4.23k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  4.23k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  13.5k|    }
 1053|     12|    *nextTokPtr = ptr;
 1054|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
 1055|  13.5k|  }
 1056|  3.92k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 3.92k, False: 133k]
  ------------------
 1057|  3.92k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  3.92k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 31, False: 3.88k]
  ------------------
 1058|     31|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     31|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     31|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     31|    }
 1062|       |    /* fall through */
 1063|  44.7k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 40.8k, False: 96.3k]
  ------------------
 1064|  48.5k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 3.83k, False: 133k]
  ------------------
 1065|  54.8k|    for (;;) {
 1066|  54.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  54.8k|#  define MINBPC(enc) 2
  ------------------
 1067|  54.8k|      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 (1067:11): [True: 186, False: 54.6k]
  ------------------
 1068|    186|        break;
 1069|  54.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  54.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  54.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  52.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 52.7k, False: 1.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  5.49k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 5.49k, False: 49.2k]
  ------------------
 1071|  5.94k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 452, False: 54.2k]
  ------------------
 1072|  5.94k|        break;
 1073|    389|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 389, False: 54.3k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    389|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    389|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 386, False: 3]
  ------------------
 1076|    386|          break;
 1077|       |        /* fall through */
 1078|  48.3k|      default:
  ------------------
  |  Branch (1078:7): [True: 48.3k, False: 6.33k]
  ------------------
 1079|  48.3k|        *nextTokPtr = ptr;
 1080|  48.3k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  48.3k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  54.6k|      }
 1082|  54.6k|    }
 1083|    186|    *nextTokPtr = ptr;
 1084|    186|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    186|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.54k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.54k, False: 134k]
  ------------------
 1086|  2.54k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.54k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.54k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.11k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.11k, False: 135k]
  ------------------
 1088|  2.11k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.11k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.11k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.11k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.54k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.54k, False: 135k]
  ------------------
 1091|  1.54k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.54k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.54k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.54k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|  1.02k|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 1.02k, False: 136k]
  ------------------
 1094|  1.02k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.02k|#  define MINBPC(enc) 2
  ------------------
 1095|  1.02k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.02k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  1.02k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 1.02k]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|  1.02k|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|  1.02k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.02k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.01k, False: 5]
  |  |  |  |  |  Branch (872:49): [True: 42, False: 975]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     42|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     42|    {                                                                          \
  |  |  135|     42|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     42|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     42|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 41]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     42|    }
  ------------------
 1099|     41|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     41|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     41|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 20, False: 21]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     41|    }
 1104|  1.02k|    *nextTokPtr = ptr;
 1105|  1.02k|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|  1.02k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  6.87k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 6.87k, False: 130k]
  ------------------
 1107|  6.87k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.87k|#  define MINBPC(enc) 2
  ------------------
 1108|  6.87k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  6.87k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.22k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.22k, False: 133k]
  ------------------
 1110|  3.22k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.22k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.22k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.22k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.22k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  3.22k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 5, False: 3.22k]
  ------------------
 1112|      5|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      5|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.22k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.22k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.22k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.20k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 25, False: 3.19k]
  |  |  |  |  |  Branch (870:4): [True: 3.20k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    254|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 254, False: 2.97k]
  ------------------
 1115|    254|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    254|#  define MINBPC(enc) 2
  ------------------
 1116|    254|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    254|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    224|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 224, False: 3.00k]
  ------------------
 1118|    224|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    224|#  define MINBPC(enc) 2
  ------------------
 1119|    224|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    224|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    232|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 232, False: 2.99k]
  ------------------
 1121|    232|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    232|#  define MINBPC(enc) 2
  ------------------
 1122|    232|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    232|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|     34|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 34, False: 3.19k]
  ------------------
 1124|    392|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 358, False: 2.86k]
  ------------------
 1125|    588|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 196, False: 3.02k]
  ------------------
 1126|    691|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 103, False: 3.12k]
  ------------------
 1127|  1.17k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 484, False: 2.74k]
  ------------------
 1128|  1.59k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 419, False: 2.80k]
  ------------------
 1129|  2.48k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 895, False: 2.32k]
  ------------------
 1130|  2.48k|      *nextTokPtr = ptr;
 1131|  2.48k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  2.48k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.22k|    }
 1133|     25|    *nextTokPtr = ptr;
 1134|     25|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
 1135|  3.55k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 3.55k, False: 133k]
  ------------------
 1136|  3.55k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.55k|#  define MINBPC(enc) 2
  ------------------
 1137|  3.55k|    return XML_TOK_OR;
  ------------------
  |  |   88|  3.55k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  4.95k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 4.95k, False: 132k]
  ------------------
 1139|  4.95k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.95k|#  define MINBPC(enc) 2
  ------------------
 1140|  4.95k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  4.95k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  6.20k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 6.20k, False: 130k]
  ------------------
 1142|  6.20k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  6.20k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  6.20k|#  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: 137k]
  |  |  ------------------
  |  | 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: 137k]
  |  |  ------------------
  |  | 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|     80|    LEAD_CASE(4)
  ------------------
  |  | 1144|     17|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 29, False: 137k]
  |  |  ------------------
  |  | 1145|     29|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 12, False: 17]
  |  |  ------------------
  |  | 1146|     17|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     12|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     17|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     17|#    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|     17|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     17|#  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|     17|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     17|#  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|     17|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  13.9k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 13.9k, False: 123k]
  ------------------
 1168|  29.6k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 15.6k, False: 121k]
  ------------------
 1169|  29.6k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  29.6k|#define XML_TOK_NAME 18
  ------------------
 1170|  29.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  29.6k|#  define MINBPC(enc) 2
  ------------------
 1171|  29.6k|    break;
 1172|    586|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 586, False: 136k]
  ------------------
 1173|    920|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 334, False: 136k]
  ------------------
 1174|  1.20k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 284, False: 136k]
  ------------------
 1175|  1.20k|#  ifdef XML_NS
 1176|  1.20k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 137k]
  ------------------
 1177|  1.20k|#  endif
 1178|  1.20k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.20k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.20k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.20k|#  define MINBPC(enc) 2
  ------------------
 1180|  1.20k|    break;
 1181|  3.29k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 3.29k, False: 133k]
  ------------------
 1182|  3.29k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  3.29k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  3.29k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  3.29k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 2.91k, False: 382]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  2.91k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.91k|#  define MINBPC(enc) 2
  ------------------
 1184|  2.91k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  2.91k|#define XML_TOK_NAME 18
  ------------------
 1185|  2.91k|      break;
 1186|  2.91k|    }
 1187|    382|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    382|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    382|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    382|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 254, False: 128]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    254|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    254|#  define MINBPC(enc) 2
  ------------------
 1189|    254|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    254|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    254|      break;
 1191|    254|    }
 1192|       |    /* fall through */
 1193|    165|  default:
  ------------------
  |  Branch (1193:3): [True: 37, False: 137k]
  ------------------
 1194|    165|    *nextTokPtr = ptr;
 1195|    165|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    165|#define XML_TOK_INVALID 0
  ------------------
 1196|   137k|  }
 1197|   318k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|   318k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   318k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   318k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  97.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 97.2k, False: 221k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  1.32M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   284k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 221k, False: 97.2k]
  |  |  ------------------
  |  |   82|   284k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   221k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   221k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   221k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 41, False: 221k]
  |  |  ------------------
  |  |   83|     41|      *nextTokPtr = ptr;                                                       \
  |  |   84|     41|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     41|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     41|    }                                                                          \
  |  |   86|   284k|    /* fall through */                                                         \
  |  |   87|   284k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 33.2k, False: 285k]
  |  |  ------------------
  |  |   88|   283k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 29.3k, False: 289k]
  |  |  ------------------
  |  |   89|   284k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 236, False: 318k]
  |  |  ------------------
  |  |   90|   284k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 212, False: 318k]
  |  |  ------------------
  |  |   91|   284k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 343, False: 318k]
  |  |  ------------------
  |  |   92|   284k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   284k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   284k|    break;                                                                     \
  |  |   94|   284k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 318k]
  |  |  |  |  ------------------
  |  |  |  |   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: 318k]
  |  |  |  |  ------------------
  |  |  |  |   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: 318k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 11]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|     11|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    120|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 120, False: 318k]
  ------------------
 1201|  1.75k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.63k, False: 316k]
  ------------------
 1202|  2.27k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 523, False: 317k]
  ------------------
 1203|  4.32k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 2.04k, False: 316k]
  ------------------
 1204|  5.64k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 1.31k, False: 317k]
  ------------------
 1205|  5.64k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 5, False: 318k]
  ------------------
 1206|  30.0k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 24.3k, False: 294k]
  ------------------
 1207|  31.3k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.25k, False: 317k]
  ------------------
 1208|  33.2k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 1.94k, False: 316k]
  ------------------
 1209|  33.2k|      *nextTokPtr = ptr;
 1210|  33.2k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 318k]
  ------------------
 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|    207|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 207, False: 318k]
  ------------------
 1232|    207|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    207|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 206]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    206|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    206|#  define MINBPC(enc) 2
  ------------------
 1237|    206|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    206|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|     68|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 68, False: 318k]
  ------------------
 1239|     68|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     68|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 67]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|     67|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     67|#  define MINBPC(enc) 2
  ------------------
 1244|     67|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|     67|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    262|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 262, False: 318k]
  ------------------
 1246|    262|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    262|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 261]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    261|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    261|#  define MINBPC(enc) 2
  ------------------
 1251|    261|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    261|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     12|    default:
  ------------------
  |  Branch (1252:5): [True: 12, False: 318k]
  ------------------
 1253|     12|      *nextTokPtr = ptr;
 1254|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
 1255|   318k|    }
 1256|   318k|  }
 1257|    161|  return -tok;
 1258|  34.0k|}
xmltok.c:big2_scanLit:
  984|  8.80k|                const char **nextTokPtr) {
  985|  40.9M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  40.9M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  40.9M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  40.9M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   472k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 472k, False: 40.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  40.9M|    switch (t) {
  988|   683k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 40.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 40.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|   341k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   341k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 341k, False: 40.6M]
  |  |  |  |  ------------------
  |  |  |  |   50|   341k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 32, False: 341k]
  |  |  |  |  ------------------
  |  |  |  |   51|   341k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     32|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   341k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   341k|#    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|   341k|    ptr += n;                                                                  \
  |  |  |  |   57|   341k|    break;
  |  |  ------------------
  |  |   63|   341k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 5, False: 40.9M]
  |  |  ------------------
  |  |   64|      5|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 40.9M]
  |  |  ------------------
  |  |   65|      9|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 40.9M]
  |  |  ------------------
  |  |   66|      9|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      9|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  10.2k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 10.2k, False: 40.9M]
  ------------------
  990|  19.0k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 8.83k, False: 40.9M]
  ------------------
  991|  19.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  19.0k|#  define MINBPC(enc) 2
  ------------------
  992|  19.0k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 10.3k, False: 8.69k]
  ------------------
  993|  10.3k|        break;
  994|  8.69k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  8.69k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  8.69k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 8.69k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  8.69k|      *nextTokPtr = ptr;
  997|  8.69k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.69k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.69k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.66k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.66k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  4.49k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 4.49k, False: 4.20k]
  ------------------
  999|  5.21k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 724, False: 7.96k]
  ------------------
 1000|  5.82k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 612, False: 8.08k]
  ------------------
 1001|  8.61k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.78k, False: 5.91k]
  ------------------
 1002|  8.63k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 20, False: 8.67k]
  ------------------
 1003|  8.66k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 29, False: 8.66k]
  ------------------
 1004|  8.66k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  8.66k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     32|      default:
  ------------------
  |  Branch (1005:7): [True: 32, False: 8.66k]
  ------------------
 1006|     32|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
 1007|  8.69k|      }
 1008|  40.5M|    default:
  ------------------
  |  Branch (1008:5): [True: 40.5M, False: 360k]
  ------------------
 1009|  40.5M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  40.5M|#  define MINBPC(enc) 2
  ------------------
 1010|  40.5M|      break;
 1011|  40.9M|    }
 1012|  40.9M|  }
 1013|     65|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     65|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  8.80k|}
xmltok.c:big2_scanDecl:
  183|  6.68k|                 const char **nextTokPtr) {
  184|  6.68k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.68k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.68k|    {                                                                          \
  |  |  |  |  135|  6.68k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.68k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 6.68k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  6.68k|    }
  |  |  ------------------
  ------------------
  185|  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.66k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.66k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    400|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 400, False: 6.28k]
  ------------------
  187|    400|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    400|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    400|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 6.68k]
  ------------------
  189|      1|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
  190|      1|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      1|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|    545|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 545, False: 6.13k]
  ------------------
  192|  6.25k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 5.71k, False: 969]
  ------------------
  193|  6.25k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.25k|#  define MINBPC(enc) 2
  ------------------
  194|  6.25k|    break;
  195|     23|  default:
  ------------------
  |  Branch (195:3): [True: 23, False: 6.65k]
  ------------------
  196|     23|    *nextTokPtr = ptr;
  197|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  198|  6.68k|  }
  199|  41.4k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  41.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  41.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  41.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  41.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 41.4k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     36|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 36, False: 41.4k]
  ------------------
  202|     36|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     36|    {                                                                          \
  |  |  135|     36|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     36|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     36|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 35]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     36|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     35|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     35|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     35|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      8|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 30, False: 5]
  |  |  |  |  |  Branch (870:4): [True: 8, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      2|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 2, False: 33]
  ------------------
  206|      3|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 34]
  ------------------
  207|      4|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 34]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 34]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|     35|      }
  212|       |      /* fall through */
  213|  4.94k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.91k, False: 36.5k]
  ------------------
  214|  5.93k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 989, False: 40.4k]
  ------------------
  215|  6.19k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 262, False: 41.1k]
  ------------------
  216|  6.19k|      *nextTokPtr = ptr;
  217|  6.19k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.19k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  30.1k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 30.1k, False: 11.3k]
  ------------------
  219|  35.2k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 5.08k, False: 36.3k]
  ------------------
  220|  35.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  35.2k|#  define MINBPC(enc) 2
  ------------------
  221|  35.2k|      break;
  222|     36|    default:
  ------------------
  |  Branch (222:5): [True: 36, False: 41.4k]
  ------------------
  223|     36|      *nextTokPtr = ptr;
  224|     36|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     36|#define XML_TOK_INVALID 0
  ------------------
  225|  41.4k|    }
  226|  41.4k|  }
  227|     24|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.25k|}
xmltok.c:big2_scanComment:
  146|    608|                    const char **nextTokPtr) {
  147|    608|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    608|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    608|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    608|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 597, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    597|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    597|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    597|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 587, False: 10]
  |  |  |  |  |  Branch (872:49): [True: 578, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     19|      *nextTokPtr = ptr;
  150|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  151|     19|    }
  152|    578|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    578|#  define MINBPC(enc) 2
  ------------------
  153|   287k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   287k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   287k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   287k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 30.3k, False: 257k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|   124k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 287k]
  |  |  |  |  ------------------
  |  |  |  |   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: 287k]
  |  |  |  |  ------------------
  |  |  |  |   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|  62.2k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  62.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 62.2k, False: 225k]
  |  |  |  |  ------------------
  |  |  |  |   50|  62.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 62.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  62.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  62.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  62.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|  62.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  62.2k|    break;
  |  |  ------------------
  |  |   63|  62.2k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 30, False: 287k]
  |  |  ------------------
  |  |   64|     30|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 287k]
  |  |  ------------------
  |  |   65|     36|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 287k]
  |  |  ------------------
  |  |   66|     36|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     36|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     36|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.47k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.47k, False: 286k]
  ------------------
  157|  1.47k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.47k|#  define MINBPC(enc) 2
  ------------------
  158|  1.47k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.47k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.47k|    {                                                                          \
  |  |  |  |  135|  1.47k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.47k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.47k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.47k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.47k|    }
  |  |  ------------------
  ------------------
  159|  1.47k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.47k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.47k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.21k, False: 263]
  |  |  |  |  |  Branch (872:49): [True: 441, False: 774]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    441|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    441|#  define MINBPC(enc) 2
  ------------------
  161|    441|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    441|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    441|    {                                                                          \
  |  |  |  |  135|    441|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    441|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    441|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 440]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    441|    }
  |  |  ------------------
  ------------------
  162|    440|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    440|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    440|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 433, False: 7]
  |  |  |  |  |  Branch (872:49): [True: 424, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     16|            *nextTokPtr = ptr;
  164|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  165|     16|          }
  166|    424|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    424|#  define MINBPC(enc) 2
  ------------------
  167|    424|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    424|#define XML_TOK_COMMENT 13
  ------------------
  168|    440|        }
  169|  1.03k|        break;
  170|   223k|      default:
  ------------------
  |  Branch (170:7): [True: 223k, False: 63.7k]
  ------------------
  171|   223k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   223k|#  define MINBPC(enc) 2
  ------------------
  172|   223k|        break;
  173|   287k|      }
  174|   287k|    }
  175|    578|  }
  176|     81|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    608|}
xmltok.c:big2_scanPi:
  277|  4.64k|               const char **nextTokPtr) {
  278|  4.64k|  int tok;
  279|  4.64k|  const char *target = ptr;
  280|  4.64k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.64k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.64k|    {                                                                          \
  |  |  |  |  135|  4.64k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.64k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.64k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 4.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  4.64k|    }
  |  |  ------------------
  ------------------
  281|  4.63k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.63k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.63k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.63k, False: 1.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  4.94k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.61k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 983, False: 3.65k]
  |  |  ------------------
  |  |  111|  4.61k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    983|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    983|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    983|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 3, False: 980]
  |  |  ------------------
  |  |  112|      3|      *nextTokPtr = ptr;                                                       \
  |  |  113|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      3|    }                                                                          \
  |  |  115|  4.61k|    /* fall through */                                                         \
  |  |  116|  4.61k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.95k, False: 1.68k]
  |  |  ------------------
  |  |  117|  4.61k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 679, False: 3.95k]
  |  |  ------------------
  |  |  118|  4.61k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  4.61k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  4.61k|    break;                                                                     \
  |  |  120|  4.61k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.63k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.63k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 4.62k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      6|  default:
  ------------------
  |  Branch (283:3): [True: 6, False: 4.63k]
  ------------------
  284|      6|    *nextTokPtr = ptr;
  285|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  286|  4.63k|  }
  287|   748k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   748k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   748k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   748k|  ((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: 737k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  3.70M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   743k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 737k, False: 10.5k]
  |  |  ------------------
  |  |   82|   743k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   737k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   737k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   737k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 737k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|   743k|    /* fall through */                                                         \
  |  |   87|   743k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.01k, False: 744k]
  |  |  ------------------
  |  |   88|   742k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 929, False: 747k]
  |  |  ------------------
  |  |   89|   743k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 618, False: 747k]
  |  |  ------------------
  |  |   90|   743k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 230, False: 747k]
  |  |  ------------------
  |  |   91|   743k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 275, False: 747k]
  |  |  ------------------
  |  |   92|   743k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   743k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   743k|    break;                                                                     \
  |  |   94|   743k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 748k]
  |  |  |  |  ------------------
  |  |  |  |   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: 748k]
  |  |  |  |  ------------------
  |  |  |  |   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|     18|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 18, False: 748k]
  |  |  |  |  ------------------
  |  |  |  |   71|     18|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.37k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.37k, False: 746k]
  ------------------
  291|  1.73k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 352, False: 747k]
  ------------------
  292|  2.30k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 577, False: 747k]
  ------------------
  293|  2.30k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.30k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.30k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.30k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.30k|#  define MINBPC(enc) 2
  ------------------
  298|   124k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   124k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   124k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   124k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 10.8k, False: 113k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  7.90k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 124k]
  |  |  |  |  ------------------
  |  |  |  |   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: 124k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  3.93k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.90k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.93k, False: 120k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.93k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 3.90k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.90k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.90k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  3.90k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  3.90k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.90k|    break;
  |  |  ------------------
  |  |   63|  3.90k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 31, False: 124k]
  |  |  ------------------
  |  |   64|     31|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 124k]
  |  |  ------------------
  |  |   65|     37|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 124k]
  |  |  ------------------
  |  |   66|     37|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     37|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     37|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  2.98k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 2.98k, False: 121k]
  ------------------
  302|  2.98k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.98k|#  define MINBPC(enc) 2
  ------------------
  303|  2.98k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.98k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.98k|    {                                                                          \
  |  |  |  |  135|  2.98k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.98k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.98k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 2.98k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  2.98k|    }
  |  |  ------------------
  ------------------
  304|  2.98k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.98k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.98k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.72k, False: 261]
  |  |  |  |  |  Branch (872:49): [True: 2.11k, False: 606]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.11k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.11k|#  define MINBPC(enc) 2
  ------------------
  306|  2.11k|            return tok;
  307|  2.11k|          }
  308|    867|          break;
  309|   117k|        default:
  ------------------
  |  Branch (309:9): [True: 117k, False: 6.96k]
  ------------------
  310|   117k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|   117k|#  define MINBPC(enc) 2
  ------------------
  311|   117k|          break;
  312|   124k|        }
  313|   124k|      }
  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: 745k]
  ------------------
  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: 45, False: 2.14k]
  |  |  |  |  ------------------
  |  |  |  |  136|     45|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     45|      }                                                                        \
  |  |  |  |  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.13k, False: 8]
  |  |  |  |  |  Branch (872:49): [True: 2.12k, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.12k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.12k|#  define MINBPC(enc) 2
  ------------------
  324|  2.12k|        return tok;
  325|  2.12k|      }
  326|       |      /* fall through */
  327|     26|    default:
  ------------------
  |  Branch (327:5): [True: 9, False: 748k]
  ------------------
  328|     26|      *nextTokPtr = ptr;
  329|     26|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  330|   748k|    }
  331|   748k|  }
  332|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  4.61k|}
xmltok.c:big2_checkPiTarget:
  232|  4.50k|                      int *tokPtr) {
  233|  4.50k|  int upper = 0;
  234|  4.50k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.50k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  4.50k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  4.50k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  4.50k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  4.50k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.93k, False: 2.56k]
  ------------------
  237|  1.93k|    return 1;
  238|  2.56k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.56k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.56k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.90k, False: 663]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.03k|  case ASCII_x:
  ------------------
  |  |   86|  1.03k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.03k, False: 1.53k]
  ------------------
  240|  1.03k|    break;
  241|    793|  case ASCII_X:
  ------------------
  |  |   59|    793|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 793, False: 1.77k]
  ------------------
  242|    793|    upper = 1;
  243|    793|    break;
  244|    737|  default:
  ------------------
  |  Branch (244:3): [True: 737, False: 1.82k]
  ------------------
  245|    737|    return 1;
  246|  2.56k|  }
  247|  1.82k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.82k|#  define MINBPC(enc) 2
  ------------------
  248|  1.82k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.82k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.82k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.38k, False: 438]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    616|  case ASCII_m:
  ------------------
  |  |   75|    616|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 616, False: 1.21k]
  ------------------
  250|    616|    break;
  251|    695|  case ASCII_M:
  ------------------
  |  |   48|    695|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 695, False: 1.13k]
  ------------------
  252|    695|    upper = 1;
  253|    695|    break;
  254|    516|  default:
  ------------------
  |  Branch (254:3): [True: 516, False: 1.31k]
  ------------------
  255|    516|    return 1;
  256|  1.82k|  }
  257|  1.31k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.31k|#  define MINBPC(enc) 2
  ------------------
  258|  1.31k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.31k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.31k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 761, False: 550]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     36|  case ASCII_l:
  ------------------
  |  |   74|     36|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 36, False: 1.27k]
  ------------------
  260|     36|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.30k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.27k|  default:
  ------------------
  |  Branch (264:3): [True: 1.27k, False: 38]
  ------------------
  265|  1.27k|    return 1;
  266|  1.31k|  }
  267|     38|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 35]
  ------------------
  268|      3|    return 0;
  269|     35|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     35|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     35|  return 1;
  271|     38|}
xmltok.c:big2_scanPercent:
  924|  2.54k|                    const char **nextTokPtr) {
  925|  2.54k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.54k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.54k|    {                                                                          \
  |  |  |  |  135|  2.54k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.54k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.54k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 23, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |  136|     23|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     23|      }                                                                        \
  |  |  |  |  138|  2.54k|    }
  |  |  ------------------
  ------------------
  926|  2.52k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.52k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.52k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.19k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.19k, False: 333]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.13k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.20k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 321, False: 2.20k]
  |  |  ------------------
  |  |  111|  1.20k|    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: 11, False: 310]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  1.20k|    /* fall through */                                                         \
  |  |  116|  1.20k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 494, False: 2.02k]
  |  |  ------------------
  |  |  117|  1.20k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 396, False: 2.12k]
  |  |  ------------------
  |  |  118|  1.20k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.20k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.20k|    break;                                                                     \
  |  |  120|  1.20k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |  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|      6|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 6, False: 2.51k]
  |  |  |  |  ------------------
  |  |  |  |  100|      6|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      2|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      4|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|      2|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    527|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 527, False: 1.99k]
  ------------------
  929|  1.01k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 484, False: 2.03k]
  ------------------
  930|  1.29k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 285, False: 2.23k]
  ------------------
  931|  1.29k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.52k]
  ------------------
  932|  1.29k|    *nextTokPtr = ptr;
  933|  1.29k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.29k|#define XML_TOK_PERCENT 22
  ------------------
  934|      7|  default:
  ------------------
  |  Branch (934:3): [True: 7, False: 2.51k]
  ------------------
  935|      7|    *nextTokPtr = ptr;
  936|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  937|  2.52k|  }
  938|  3.79k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  3.79k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.79k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.79k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.97k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.97k, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  8.28k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.67k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 795, False: 3.00k]
  |  |  ------------------
  |  |   82|  2.67k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    795|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    795|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    795|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 776]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  2.67k|    /* fall through */                                                         \
  |  |   87|  2.67k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 516, False: 3.28k]
  |  |  ------------------
  |  |   88|  1.73k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 438, False: 3.35k]
  |  |  ------------------
  |  |   89|  2.00k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 278, False: 3.51k]
  |  |  ------------------
  |  |   90|  2.42k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 420, False: 3.37k]
  |  |  ------------------
  |  |   91|  2.67k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 245, False: 3.55k]
  |  |  ------------------
  |  |   92|  2.67k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.67k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.67k|    break;                                                                     \
  |  |   94|  2.67k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.79k]
  |  |  |  |  ------------------
  |  |  |  |   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.79k]
  |  |  |  |  ------------------
  |  |  |  |   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|     20|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 3.77k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.06k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.06k, False: 2.72k]
  ------------------
  942|  1.06k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.06k|#  define MINBPC(enc) 2
  ------------------
  943|  1.06k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.06k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     16|    default:
  ------------------
  |  Branch (944:5): [True: 16, False: 3.78k]
  ------------------
  945|     16|      *nextTokPtr = ptr;
  946|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  947|  3.79k|    }
  948|  3.79k|  }
  949|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.20k|}
xmltok.c:big2_scanPoundName:
  954|  6.20k|                      const char **nextTokPtr) {
  955|  6.20k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.20k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.20k|    {                                                                          \
  |  |  |  |  135|  6.20k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.20k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 6.20k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  6.20k|    }
  |  |  ------------------
  ------------------
  956|  6.20k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.20k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.20k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.13k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.13k, False: 73]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  5.67k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.15k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 42, False: 6.16k]
  |  |  ------------------
  |  |  111|  6.15k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     42|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     42|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     42|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 29]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  6.15k|    /* fall through */                                                         \
  |  |  116|  6.15k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.55k, False: 653]
  |  |  ------------------
  |  |  117|  6.15k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 579, False: 5.62k]
  |  |  ------------------
  |  |  118|  6.15k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  6.15k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  6.15k|    break;                                                                     \
  |  |  120|  6.15k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.20k]
  |  |  |  |  ------------------
  |  |  |  |  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.20k]
  |  |  |  |  ------------------
  |  |  |  |  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|     26|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 26, False: 6.17k]
  |  |  |  |  ------------------
  |  |  |  |  100|     26|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 22]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     22|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     44|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     22|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     22|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     22|    }                                                                          \
  |  |  |  |  106|     22|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      6|  default:
  ------------------
  |  Branch (958:3): [True: 6, False: 6.19k]
  ------------------
  959|      6|    *nextTokPtr = ptr;
  960|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  961|  6.20k|  }
  962|  42.6k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  42.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  42.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  42.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  42.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 42.3k, False: 309]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|   131k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  36.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 292, False: 42.3k]
  |  |  ------------------
  |  |   82|  36.5k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    292|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    292|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    292|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 7, False: 285]
  |  |  ------------------
  |  |   83|      7|      *nextTokPtr = ptr;                                                       \
  |  |   84|      7|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      7|    }                                                                          \
  |  |   86|  36.5k|    /* fall through */                                                         \
  |  |   87|  36.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 22.9k, False: 19.6k]
  |  |  ------------------
  |  |   88|  35.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 12.6k, False: 29.9k]
  |  |  ------------------
  |  |   89|  36.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 205, False: 42.4k]
  |  |  ------------------
  |  |   90|  36.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 42.4k]
  |  |  ------------------
  |  |   91|  36.5k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 220, False: 42.4k]
  |  |  ------------------
  |  |   92|  36.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  36.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  36.5k|    break;                                                                     \
  |  |   94|  36.5k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 42.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 42.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|     10|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 42.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 6, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    360|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 360, False: 42.2k]
  ------------------
  966|    556|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 196, False: 42.4k]
  ------------------
  967|  5.93k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 5.38k, False: 37.2k]
  ------------------
  968|  5.98k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 49, False: 42.5k]
  ------------------
  969|  6.00k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 20, False: 42.6k]
  ------------------
  970|  6.00k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 42.6k]
  ------------------
  971|  6.07k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 70, False: 42.5k]
  ------------------
  972|  6.07k|      *nextTokPtr = ptr;
  973|  6.07k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  6.07k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      9|    default:
  ------------------
  |  Branch (974:5): [True: 9, False: 42.6k]
  ------------------
  975|      9|      *nextTokPtr = ptr;
  976|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  977|  42.6k|    }
  978|  42.6k|  }
  979|     56|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     56|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  6.15k|}
xmltok.c:big2_contentTok:
  824|  86.6k|                   const char **nextTokPtr) {
  825|  86.6k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.13k, False: 85.5k]
  ------------------
  826|  1.13k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.13k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  85.5k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  85.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  85.5k|    size_t n = end - ptr;
  829|  85.5k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  85.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 14.3k, False: 71.2k]
  ------------------
  830|  14.3k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  14.3k|#  define MINBPC(enc) 2
  ------------------
  831|  14.3k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 112, False: 14.1k]
  ------------------
  832|    112|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    112|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  14.1k|      end = ptr + n;
  834|  14.1k|    }
  835|  85.5k|  }
  836|  85.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  85.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  85.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  78.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 78.4k, False: 6.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  17.4k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 17.4k, False: 68.0k]
  ------------------
  838|  17.4k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  17.4k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  17.4k|#  define MINBPC(enc) 2
  ------------------
  839|  14.5k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 14.5k, False: 70.8k]
  ------------------
  840|  14.5k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  14.5k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  14.5k|#  define MINBPC(enc) 2
  ------------------
  841|  13.3k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 13.3k, False: 72.0k]
  ------------------
  842|  13.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.3k|#  define MINBPC(enc) 2
  ------------------
  843|  13.3k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  13.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  13.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  13.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 18, False: 13.3k]
  ------------------
  844|     18|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     18|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  13.3k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  13.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  13.3k|  ((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: 2.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 599, False: 12.7k]
  ------------------
  846|    599|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    599|#  define MINBPC(enc) 2
  ------------------
  847|  13.3k|    *nextTokPtr = ptr;
  848|  13.3k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  13.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  9.63k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 9.63k, False: 75.7k]
  ------------------
  850|  9.63k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  9.63k|#  define MINBPC(enc) 2
  ------------------
  851|  9.63k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.63k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  13.8k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 13.8k, False: 71.5k]
  ------------------
  853|  13.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.8k|#  define MINBPC(enc) 2
  ------------------
  854|  13.8k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  13.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  13.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  13.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 6, False: 13.8k]
  ------------------
  855|      6|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      6|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  13.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  13.8k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  13.8k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 11.7k, False: 2.03k]
  |  |  |  |  |  Branch (872:49): [True: 9.28k, False: 2.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  4.53k|      break;
  858|  9.28k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.28k|#  define MINBPC(enc) 2
  ------------------
  859|  9.28k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  9.28k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  9.28k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 3, False: 9.28k]
  ------------------
  860|      3|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      3|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  9.28k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  9.28k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  9.28k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 8.90k, False: 378]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 8.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  9.28k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  9.28k|#  define MINBPC(enc) 2
  ------------------
  863|  9.28k|      break;
  864|  9.28k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  3.56k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 85.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 85.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.74k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.68k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.74k, False: 83.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.74k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 56, False: 1.68k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.68k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     56|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.68k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.68k|#    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.68k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.68k|    break;
  |  |  ------------------
  |  |   63|  1.68k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 70, False: 85.3k]
  |  |  ------------------
  |  |   64|     70|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 85.4k]
  |  |  ------------------
  |  |   65|     83|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 13, False: 85.4k]
  |  |  ------------------
  |  |   66|     83|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     83|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     83|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  14.7k|  default:
  ------------------
  |  Branch (868:3): [True: 14.7k, False: 70.6k]
  ------------------
  869|  14.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.7k|#  define MINBPC(enc) 2
  ------------------
  870|  14.7k|    break;
  871|  85.4k|  }
  872|  1.49M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  1.49M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.49M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.49M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   116k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 116k, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  874|      0|#  define LEAD_CASE(n)                                                         \
  875|      0|  case BT_LEAD##n:                                                             \
  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  877|      0|      *nextTokPtr = ptr;                                                       \
  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  879|      0|    }                                                                          \
  880|      0|    ptr += n;                                                                  \
  881|      0|    break;
  882|      0|      LEAD_CASE(2)
  ------------------
  |  |  875|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 0, False: 1.49M]
  |  |  ------------------
  |  |  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  877|      0|      *nextTokPtr = ptr;                                                       \
  |  |  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      0|    }                                                                          \
  |  |  880|      0|    ptr += n;                                                                  \
  |  |  881|      0|    break;
  ------------------
  883|      0|      LEAD_CASE(3)
  ------------------
  |  |  875|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 0, False: 1.49M]
  |  |  ------------------
  |  |  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|   287k|      LEAD_CASE(4)
  ------------------
  |  |  875|   287k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 287k, False: 1.21M]
  |  |  ------------------
  |  |  876|   287k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|   287k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 49, False: 287k]
  |  |  ------------------
  |  |  877|     49|      *nextTokPtr = ptr;                                                       \
  |  |  878|     49|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     49|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     49|    }                                                                          \
  |  |  880|   287k|    ptr += n;                                                                  \
  |  |  881|   287k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  20.9k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 20.9k, False: 1.47M]
  ------------------
  887|  20.9k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  20.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  20.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 20.9k, False: 3]
  |  |  ------------------
  ------------------
  888|  20.9k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  20.9k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  20.9k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 17.8k, False: 3.06k]
  |  |  |  |  |  Branch (872:49): [True: 5.37k, False: 12.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  15.5k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  15.5k|#  define MINBPC(enc) 2
  ------------------
  890|  15.5k|          break;
  891|  15.5k|        }
  892|  5.37k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  5.37k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  5.37k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 5.37k, False: 2]
  |  |  ------------------
  ------------------
  893|  5.37k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  5.37k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.37k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.02k, False: 1.35k]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 4.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  5.37k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.37k|#  define MINBPC(enc) 2
  ------------------
  895|  5.37k|            break;
  896|  5.37k|          }
  897|      1|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
  898|      1|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  899|  5.37k|        }
  900|  5.37k|      }
  901|       |      /* fall through */
  902|  6.00k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 5.99k, False: 1.49M]
  ------------------
  903|  9.88k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.88k, False: 1.49M]
  ------------------
  904|  9.94k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 53, False: 1.49M]
  ------------------
  905|  9.94k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 1.49M]
  ------------------
  906|  9.95k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 9, False: 1.49M]
  ------------------
  907|  21.5k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 11.5k, False: 1.48M]
  ------------------
  908|  29.8k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 8.31k, False: 1.49M]
  ------------------
  909|  29.8k|      *nextTokPtr = ptr;
  910|  29.8k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  29.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  1.16M|    default:
  ------------------
  |  Branch (911:5): [True: 1.16M, False: 338k]
  ------------------
  912|  1.16M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.16M|#  define MINBPC(enc) 2
  ------------------
  913|  1.16M|      break;
  914|  1.49M|    }
  915|  1.49M|  }
  916|    360|  *nextTokPtr = ptr;
  917|    360|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    360|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  30.2k|}
xmltok.c:big2_scanLt:
  726|  17.4k|               const char **nextTokPtr) {
  727|  17.4k|#  ifdef XML_NS
  728|  17.4k|  int hadColon;
  729|  17.4k|#  endif
  730|  17.4k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  17.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  17.4k|    {                                                                          \
  |  |  |  |  135|  17.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  17.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  17.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 17, False: 17.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|     17|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     17|      }                                                                        \
  |  |  |  |  138|  17.4k|    }
  |  |  ------------------
  ------------------
  731|  17.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  17.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  17.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.5k, False: 2.86k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  11.3k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.83k, False: 14.5k]
  |  |  ------------------
  |  |  111|  11.9k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.83k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.83k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.83k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 16, False: 2.82k]
  |  |  ------------------
  |  |  112|     16|      *nextTokPtr = ptr;                                                       \
  |  |  113|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     16|    }                                                                          \
  |  |  115|  11.9k|    /* fall through */                                                         \
  |  |  116|  11.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.61k, False: 11.7k]
  |  |  ------------------
  |  |  117|  11.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.55k, False: 13.8k]
  |  |  ------------------
  |  |  118|  11.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  11.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  11.9k|    break;                                                                     \
  |  |  120|  11.9k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 17.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 17.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 17.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    878|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 878, False: 16.5k]
  ------------------
  734|    878|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    878|#  define MINBPC(enc) 2
  ------------------
  735|    878|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    878|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    878|    {                                                                          \
  |  |  |  |  135|    878|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    878|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    878|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 877]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    878|    }
  |  |  ------------------
  ------------------
  736|    877|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    877|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    877|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    864|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 21, False: 856]
  |  |  |  |  |  Branch (870:4): [True: 864, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    208|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 208, False: 669]
  ------------------
  738|    208|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    208|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    208|#  define MINBPC(enc) 2
  ------------------
  739|    648|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 648, False: 229]
  ------------------
  740|    648|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    648|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    648|#  define MINBPC(enc) 2
  ------------------
  741|    877|    }
  742|     21|    *nextTokPtr = ptr;
  743|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  744|  2.06k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 2.06k, False: 15.3k]
  ------------------
  745|  2.06k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.06k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.06k|#  define MINBPC(enc) 2
  ------------------
  746|  2.40k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 2.40k, False: 14.9k]
  ------------------
  747|  2.40k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.40k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.40k|#  define MINBPC(enc) 2
  ------------------
  748|     10|  default:
  ------------------
  |  Branch (748:3): [True: 10, False: 17.3k]
  ------------------
  749|     10|    *nextTokPtr = ptr;
  750|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  751|  17.3k|  }
  752|  11.9k|#  ifdef XML_NS
  753|  11.9k|  hadColon = 0;
  754|  11.9k|#  endif
  755|       |  /* we have a start-tag */
  756|  39.8k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  39.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  39.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  39.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.6k, False: 24.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|   131k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  27.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 24.1k, False: 15.6k]
  |  |  ------------------
  |  |   82|  27.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  24.1k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  24.1k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  24.1k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 20, False: 24.1k]
  |  |  ------------------
  |  |   83|     20|      *nextTokPtr = ptr;                                                       \
  |  |   84|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     20|    }                                                                          \
  |  |   86|  27.9k|    /* fall through */                                                         \
  |  |   87|  27.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.38k, False: 38.4k]
  |  |  ------------------
  |  |   88|  27.1k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.57k, False: 38.2k]
  |  |  ------------------
  |  |   89|  27.4k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 336, False: 39.5k]
  |  |  ------------------
  |  |   90|  27.6k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 240, False: 39.6k]
  |  |  ------------------
  |  |   91|  27.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 252, False: 39.6k]
  |  |  ------------------
  |  |   92|  27.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  27.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  27.9k|    break;                                                                     \
  |  |   94|  27.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 39.8k]
  |  |  |  |  ------------------
  |  |  |  |   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: 39.8k]
  |  |  |  |  ------------------
  |  |  |  |   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|     12|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 39.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 8]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     16|#    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|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|      8|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 39.8k]
  ------------------
  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.47k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.47k, False: 37.3k]
  ------------------
  777|  4.37k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.90k, False: 37.9k]
  ------------------
  778|  5.68k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.30k, False: 38.5k]
  ------------------
  779|  5.68k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.68k|#  define MINBPC(enc) 2
  ------------------
  780|  6.98k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  6.98k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.98k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.98k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.69k, False: 1.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  4.27k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.69k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.27k, False: 5.71k]
  |  |  ------------------
  |  |  111|  3.69k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.27k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.27k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.27k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 1.25k]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  3.69k|    /* fall through */                                                         \
  |  |  116|  3.69k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.71k, False: 5.27k]
  |  |  ------------------
  |  |  117|  3.69k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 721, False: 6.26k]
  |  |  ------------------
  |  |  118|  3.69k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.69k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.69k|    break;                                                                     \
  |  |  120|  3.69k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.98k]
  |  |  |  |  ------------------
  |  |  |  |  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.98k]
  |  |  |  |  ------------------
  |  |  |  |  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: 6.96k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  783|  1.56k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.56k, False: 5.42k]
  ------------------
  784|  1.56k|          goto gt;
  785|    345|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 345, False: 6.64k]
  ------------------
  786|    345|          goto sol;
  787|    542|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 542, False: 6.44k]
  ------------------
  788|    910|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 368, False: 6.62k]
  ------------------
  789|  1.34k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 436, False: 6.55k]
  ------------------
  790|  1.34k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.34k|#  define MINBPC(enc) 2
  ------------------
  791|  1.34k|          continue;
  792|      7|        default:
  ------------------
  |  Branch (792:9): [True: 7, False: 6.98k]
  ------------------
  793|      7|          *nextTokPtr = ptr;
  794|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  795|  6.98k|        }
  796|  3.69k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  3.69k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  6.98k|      }
  798|     40|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  5.68k|    }
  800|  5.92k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.92k, False: 33.9k]
  ------------------
  801|  7.49k|    gt:
  802|  7.49k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.49k|#  define MINBPC(enc) 2
  ------------------
  803|  7.49k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  7.49k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    272|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 272, False: 39.5k]
  ------------------
  805|    617|    sol:
  806|    617|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    617|#  define MINBPC(enc) 2
  ------------------
  807|    617|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    617|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    617|    {                                                                          \
  |  |  |  |  135|    617|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    617|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    617|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 607]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|    617|    }
  |  |  ------------------
  ------------------
  808|    607|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    607|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    607|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 598, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 583, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     24|        *nextTokPtr = ptr;
  810|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  811|     24|      }
  812|    583|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    583|#  define MINBPC(enc) 2
  ------------------
  813|    583|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    583|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      9|    default:
  ------------------
  |  Branch (814:5): [True: 9, False: 39.8k]
  ------------------
  815|      9|      *nextTokPtr = ptr;
  816|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  817|  39.8k|    }
  818|  39.8k|  }
  819|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  11.9k|}
xmltok.c:big2_scanCdataSection:
  337|    648|                         const char **nextTokPtr) {
  338|    648|  static const char CDATA_LSQB[]
  339|    648|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    648|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    648|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    648|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    648|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    648|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    648|#define ASCII_LSQB 0x5B
  ------------------
  340|    648|  int i;
  341|    648|  UNUSED_P(enc);
  ------------------
  |  |  135|    648|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    648|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    648|    {                                                                          \
  |  |  135|    648|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    648|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    648|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 646]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|    648|    }
  ------------------
  344|  4.45k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.81k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.82k, False: 630]
  ------------------
  345|  3.82k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  3.82k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.82k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.82k, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 3.81k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     16|      *nextTokPtr = ptr;
  347|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  348|     16|    }
  349|  3.82k|  }
  350|    630|  *nextTokPtr = ptr;
  351|    630|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    630|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    646|}
xmltok.c:big2_scanEndTag:
  432|  2.40k|                   const char **nextTokPtr) {
  433|  2.40k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.40k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.40k|    {                                                                          \
  |  |  |  |  135|  2.40k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.40k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.40k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.40k|    }
  |  |  ------------------
  ------------------
  434|  2.40k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.40k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.40k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.08k, False: 325]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  2.06k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.37k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 296, False: 2.11k]
  |  |  ------------------
  |  |  111|  2.37k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    296|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    296|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    296|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 295]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  2.37k|    /* fall through */                                                         \
  |  |  116|  2.37k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.43k, False: 972]
  |  |  ------------------
  |  |  117|  2.37k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 647, False: 1.75k]
  |  |  ------------------
  |  |  118|  2.37k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.37k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.37k|    break;                                                                     \
  |  |  120|  2.37k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     23|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 23, False: 2.38k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      6|  default:
  ------------------
  |  Branch (436:3): [True: 6, False: 2.40k]
  ------------------
  437|      6|    *nextTokPtr = ptr;
  438|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  439|  2.40k|  }
  440|  4.06k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  4.06k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.06k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.06k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.34k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.34k, False: 716]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  5.71k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.75k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 688, False: 3.37k]
  |  |  ------------------
  |  |   82|  1.75k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    688|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    688|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    688|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 675]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  1.75k|    /* fall through */                                                         \
  |  |   87|  1.75k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 243, False: 3.82k]
  |  |  ------------------
  |  |   88|  1.13k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 221, False: 3.84k]
  |  |  ------------------
  |  |   89|  1.36k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 226, False: 3.83k]
  |  |  ------------------
  |  |   90|  1.56k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 195, False: 3.86k]
  |  |  ------------------
  |  |   91|  1.75k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 3.86k]
  |  |  ------------------
  |  |   92|  1.75k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.75k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.75k|    break;                                                                     \
  |  |   94|  1.75k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 4.06k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 4.06k]
  |  |  |  |  ------------------
  |  |  |  |   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|     23|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 4.04k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    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|     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;
  |  |  ------------------
  ------------------
  443|    318|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 318, False: 3.74k]
  ------------------
  444|  1.40k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 1.08k, False: 2.97k]
  ------------------
  445|  1.77k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 371, False: 3.69k]
  ------------------
  446|  2.57k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.77k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    846|#  define MINBPC(enc) 2
  ------------------
  447|  2.57k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.57k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.57k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.54k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.54k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    221|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 221, False: 2.35k]
  ------------------
  449|    558|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 337, False: 2.24k]
  ------------------
  450|    846|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 288, False: 2.28k]
  ------------------
  451|    846|          break;
  452|  1.69k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.69k, False: 885]
  ------------------
  453|  1.69k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.69k|#  define MINBPC(enc) 2
  ------------------
  454|  1.69k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.69k|#define XML_TOK_END_TAG 5
  ------------------
  455|     39|        default:
  ------------------
  |  Branch (455:9): [True: 39, False: 2.53k]
  ------------------
  456|     39|          *nextTokPtr = ptr;
  457|     39|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
  458|  2.57k|        }
  459|  2.57k|      }
  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: 4.06k]
  ------------------
  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|    490|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 490, False: 3.57k]
  ------------------
  469|    490|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    490|#  define MINBPC(enc) 2
  ------------------
  470|    490|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    490|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 4.05k]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  4.06k|    }
  475|  4.06k|  }
  476|     67|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  2.37k|}
xmltok.c:big2_scanAtts:
  573|  3.69k|                 const char **nextTokPtr) {
  574|  3.69k|#  ifdef XML_NS
  575|  3.69k|  int hadColon = 0;
  576|  3.69k|#  endif
  577|   202k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   202k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   202k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   202k|  ((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: 1.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  80.0k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  20.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.49k, False: 201k]
  |  |  ------------------
  |  |   82|  20.3k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.49k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.49k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.49k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 1.47k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  20.3k|    /* fall through */                                                         \
  |  |   87|  20.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 17.2k, False: 185k]
  |  |  ------------------
  |  |   88|  19.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.02k, False: 201k]
  |  |  ------------------
  |  |   89|  19.9k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 194, False: 202k]
  |  |  ------------------
  |  |   90|  20.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 200, False: 202k]
  |  |  ------------------
  |  |   91|  20.3k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 198, False: 202k]
  |  |  ------------------
  |  |   92|  20.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  20.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  20.3k|    break;                                                                     \
  |  |   94|  20.3k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 202k]
  |  |  |  |  ------------------
  |  |  |  |   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: 202k]
  |  |  |  |  ------------------
  |  |  |  |   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|     26|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 26, False: 202k]
  |  |  |  |  ------------------
  |  |  |  |   71|     26|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 22]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     22|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     44|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     22|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     22|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     22|    }                                                                          \
  |  |  |  |   77|     22|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 202k]
  ------------------
  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|    620|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 620, False: 201k]
  ------------------
  598|    854|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 234, False: 202k]
  ------------------
  599|  1.83k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 977, False: 201k]
  ------------------
  600|  2.76k|      for (;;) {
  601|  2.76k|        int t;
  602|       |
  603|  2.76k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.76k|#  define MINBPC(enc) 2
  ------------------
  604|  2.76k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.76k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.76k|    {                                                                          \
  |  |  |  |  135|  2.76k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.76k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.76k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 41, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |  136|     41|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     41|      }                                                                        \
  |  |  |  |  138|  2.76k|    }
  |  |  ------------------
  ------------------
  605|  2.72k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  2.72k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.72k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.69k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.72k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.76k, False: 958]
  ------------------
  607|  1.76k|          break;
  608|    958|        switch (t) {
  609|    510|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 510, False: 448]
  ------------------
  610|    714|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 204, False: 754]
  ------------------
  611|    931|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 217, False: 741]
  ------------------
  612|    931|          break;
  613|     27|        default:
  ------------------
  |  Branch (613:9): [True: 27, False: 931]
  ------------------
  614|     27|          *nextTokPtr = ptr;
  615|     27|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  616|    958|        }
  617|    958|      }
  618|       |      /* fall through */
  619|   182k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 180k, False: 22.2k]
  ------------------
  620|   182k|      int open;
  621|   182k|#  ifdef XML_NS
  622|   182k|      hadColon = 0;
  623|   182k|#  endif
  624|   182k|      for (;;) {
  625|   182k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   182k|#  define MINBPC(enc) 2
  ------------------
  626|   182k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   182k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   182k|    {                                                                          \
  |  |  |  |  135|   182k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   182k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   182k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 182k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|   182k|    }
  |  |  ------------------
  ------------------
  627|   182k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   182k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   182k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   182k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 182k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   182k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 175k, False: 7.09k]
  |  Branch (628:32): [True: 6.42k, False: 672]
  ------------------
  629|   182k|          break;
  630|    672|        switch (open) {
  631|    197|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 197, False: 475]
  ------------------
  632|    395|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 198, False: 474]
  ------------------
  633|    646|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 251, False: 421]
  ------------------
  634|    646|          break;
  635|     26|        default:
  ------------------
  |  Branch (635:9): [True: 26, False: 646]
  ------------------
  636|     26|          *nextTokPtr = ptr;
  637|     26|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  638|    672|        }
  639|    672|      }
  640|   182k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   182k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  8.34M|      for (;;) {
  643|  8.34M|        int t;
  644|  8.34M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.34M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.34M|    {                                                                          \
  |  |  |  |  135|  8.34M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.34M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  8.34M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 67, False: 8.34M]
  |  |  |  |  ------------------
  |  |  |  |  136|     67|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     67|      }                                                                        \
  |  |  |  |  138|  8.34M|    }
  |  |  ------------------
  ------------------
  645|  8.34M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  8.34M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.34M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   539k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 539k, False: 7.80M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  8.34M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 181k, False: 8.15M]
  ------------------
  647|   181k|          break;
  648|  8.15M|        switch (t) {
  649|   181k|          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.15M]
  |  |  |  |  ------------------
  |  |  |  |   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.15M]
  |  |  |  |  ------------------
  |  |  |  |   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|  90.8k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  90.7k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 90.8k, False: 8.06M]
  |  |  |  |  ------------------
  |  |  |  |   50|  90.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 90.7k]
  |  |  |  |  ------------------
  |  |  |  |   51|  90.7k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  90.7k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  90.7k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  90.7k|    ptr += n;                                                                  \
  |  |  |  |   57|  90.7k|    break;
  |  |  ------------------
  |  |   63|  90.7k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 28, False: 8.15M]
  |  |  ------------------
  |  |   64|     28|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 8.15M]
  |  |  ------------------
  |  |   65|     33|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 8.15M]
  |  |  ------------------
  |  |   66|     33|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     33|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|   100k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 100k, False: 8.05M]
  ------------------
  651|   100k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|   100k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|   100k|#  define MINBPC(enc) 2
  ------------------
  652|   100k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 11, False: 100k]
  ------------------
  653|     11|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 8, False: 3]
  ------------------
  654|      8|              *nextTokPtr = ptr;
  655|     11|            return tok;
  656|     11|          }
  657|   100k|          break;
  658|   100k|        }
  659|   100k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 2, False: 8.15M]
  ------------------
  660|      2|          *nextTokPtr = ptr;
  661|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  662|  7.96M|        default:
  ------------------
  |  Branch (662:9): [True: 7.96M, False: 190k]
  ------------------
  663|  7.96M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.96M|#  define MINBPC(enc) 2
  ------------------
  664|  7.96M|          break;
  665|  8.15M|        }
  666|  8.15M|      }
  667|   181k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   181k|#  define MINBPC(enc) 2
  ------------------
  668|   181k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   181k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   181k|    {                                                                          \
  |  |  |  |  135|   181k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   181k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   181k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 181k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   181k|    }
  |  |  ------------------
  ------------------
  669|   181k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   181k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   181k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   181k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 181k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  7.31k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 7.31k, False: 174k]
  ------------------
  671|  8.80k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 1.48k, False: 180k]
  ------------------
  672|   179k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 170k, False: 10.8k]
  ------------------
  673|   179k|        break;
  674|    639|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 639, False: 181k]
  ------------------
  675|    639|        goto sol;
  676|  1.41k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.41k, False: 180k]
  ------------------
  677|  1.41k|        goto gt;
  678|     28|      default:
  ------------------
  |  Branch (678:7): [True: 28, False: 181k]
  ------------------
  679|     28|        *nextTokPtr = ptr;
  680|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  681|   181k|      }
  682|       |      /* ptr points to closing quote */
  683|   183k|      for (;;) {
  684|   183k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   183k|#  define MINBPC(enc) 2
  ------------------
  685|   183k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   183k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   183k|    {                                                                          \
  |  |  |  |  135|   183k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   183k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   183k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 183k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|   183k|    }
  |  |  ------------------
  ------------------
  686|   183k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   183k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   183k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   181k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 181k, False: 1.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   160k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   178k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.21k, False: 181k]
  |  |  ------------------
  |  |  111|   178k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.21k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.21k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.21k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 9, False: 1.20k]
  |  |  ------------------
  |  |  112|      9|      *nextTokPtr = ptr;                                                       \
  |  |  113|      9|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      9|    }                                                                          \
  |  |  115|   178k|    /* fall through */                                                         \
  |  |  116|   178k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 157k, False: 25.3k]
  |  |  ------------------
  |  |  117|   178k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 19.7k, False: 163k]
  |  |  ------------------
  |  |  118|   178k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   178k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   178k|    break;                                                                     \
  |  |  120|   178k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 183k]
  |  |  |  |  ------------------
  |  |  |  |  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: 183k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     25|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 25, False: 183k]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     42|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     21|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    788|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 788, False: 182k]
  ------------------
  689|  1.47k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 684, False: 182k]
  ------------------
  690|  3.28k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 1.81k, False: 181k]
  ------------------
  691|  3.28k|          continue;
  692|    622|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 622, False: 182k]
  ------------------
  693|  2.03k|        gt:
  694|  2.03k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.03k|#  define MINBPC(enc) 2
  ------------------
  695|  2.03k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  2.03k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    481|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 481, False: 182k]
  ------------------
  697|  1.12k|        sol:
  698|  1.12k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.12k|#  define MINBPC(enc) 2
  ------------------
  699|  1.12k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.12k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.12k|    {                                                                          \
  |  |  |  |  135|  1.12k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.12k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.12k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  1.12k|    }
  |  |  ------------------
  ------------------
  700|  1.11k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  1.11k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.11k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.10k, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 1.09k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     16|            *nextTokPtr = ptr;
  702|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  703|     16|          }
  704|  1.09k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.09k|#  define MINBPC(enc) 2
  ------------------
  705|  1.09k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  1.09k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|     10|        default:
  ------------------
  |  Branch (706:9): [True: 10, False: 183k]
  ------------------
  707|     10|          *nextTokPtr = ptr;
  708|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  709|   183k|        }
  710|   178k|        break;
  711|   183k|      }
  712|   178k|      break;
  713|   179k|    }
  714|   178k|    default:
  ------------------
  |  Branch (714:5): [True: 12, False: 202k]
  ------------------
  715|     12|      *nextTokPtr = ptr;
  716|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  717|   202k|    }
  718|   202k|  }
  719|     84|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     84|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.69k|}
xmltok.c:big2_scanRef:
  545|   214k|                const char **nextTokPtr) {
  546|   214k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   214k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   214k|    {                                                                          \
  |  |  |  |  135|   214k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   214k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   214k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 214k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|   214k|    }
  |  |  ------------------
  ------------------
  547|   214k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   214k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   214k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   213k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 213k, False: 1.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  8.53k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   206k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.16k, False: 213k]
  |  |  ------------------
  |  |  111|   206k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.16k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.16k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.16k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 6, False: 1.15k]
  |  |  ------------------
  |  |  112|      6|      *nextTokPtr = ptr;                                                       \
  |  |  113|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      6|    }                                                                          \
  |  |  115|   206k|    /* fall through */                                                         \
  |  |  116|   206k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 6.20k, False: 208k]
  |  |  ------------------
  |  |  117|   206k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 199k, False: 14.9k]
  |  |  ------------------
  |  |  118|   206k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   206k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   206k|    break;                                                                     \
  |  |  120|   206k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 214k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 214k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     10|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10, False: 214k]
  |  |  |  |  ------------------
  |  |  |  |  100|     10|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|      5|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  7.52k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 7.52k, False: 206k]
  ------------------
  550|  7.52k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.52k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.52k|#  define MINBPC(enc) 2
  ------------------
  551|     11|  default:
  ------------------
  |  Branch (551:3): [True: 11, False: 214k]
  ------------------
  552|     11|    *nextTokPtr = ptr;
  553|     11|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  554|   214k|  }
  555|   235k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   235k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   235k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   235k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   230k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 230k, False: 5.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   117k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  28.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 5.60k, False: 230k]
  |  |  ------------------
  |  |   82|  28.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  5.60k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  5.60k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  5.60k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 5.58k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  28.9k|    /* fall through */                                                         \
  |  |   87|  28.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 21.4k, False: 214k]
  |  |  ------------------
  |  |   88|  27.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 808, False: 234k]
  |  |  ------------------
  |  |   89|  28.3k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 556, False: 235k]
  |  |  ------------------
  |  |   90|  28.6k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 234, False: 235k]
  |  |  ------------------
  |  |   91|  28.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 337, False: 235k]
  |  |  ------------------
  |  |   92|  28.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  28.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  28.9k|    break;                                                                     \
  |  |   94|  28.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 235k]
  |  |  |  |  ------------------
  |  |  |  |   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: 235k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 235k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   206k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 206k, False: 28.9k]
  ------------------
  559|   206k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   206k|#  define MINBPC(enc) 2
  ------------------
  560|   206k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   206k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     10|    default:
  ------------------
  |  Branch (561:5): [True: 10, False: 235k]
  ------------------
  562|     10|      *nextTokPtr = ptr;
  563|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  564|   235k|    }
  565|   235k|  }
  566|     55|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     55|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   206k|}
xmltok.c:big2_scanCharRef:
  514|  7.52k|                    const char **nextTokPtr) {
  515|  7.52k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  7.52k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  7.52k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 7.51k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  7.51k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  7.51k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  7.51k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 7.51k, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 6.18k, False: 1.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  6.18k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  6.18k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  6.18k|#  define MINBPC(enc) 2
  ------------------
  518|  1.33k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.33k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.33k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.32k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.32k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.31k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.31k, False: 20]
  ------------------
  520|  1.31k|      break;
  521|     20|    default:
  ------------------
  |  Branch (521:5): [True: 20, False: 1.31k]
  ------------------
  522|     20|      *nextTokPtr = ptr;
  523|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  524|  1.33k|    }
  525|  4.76k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.31k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.45k|#  define MINBPC(enc) 2
  ------------------
  526|  4.76k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.76k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.76k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.73k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.73k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  3.45k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.45k, False: 1.30k]
  ------------------
  528|  3.45k|        break;
  529|  1.27k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.27k, False: 3.48k]
  ------------------
  530|  1.27k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.27k|#  define MINBPC(enc) 2
  ------------------
  531|  1.27k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.27k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     32|      default:
  ------------------
  |  Branch (532:7): [True: 32, False: 4.72k]
  ------------------
  533|     32|        *nextTokPtr = ptr;
  534|     32|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  535|  4.76k|      }
  536|  4.76k|    }
  537|  1.31k|  }
  538|     11|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  7.52k|}
xmltok.c:big2_scanHexCharRef:
  483|  6.18k|                       const char **nextTokPtr) {
  484|  6.18k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  6.18k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.18k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.18k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.18k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  6.18k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.18k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.18k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.17k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  3.68k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 3.68k, False: 2.50k]
  ------------------
  487|  6.17k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.49k, False: 3.69k]
  ------------------
  488|  6.17k|      break;
  489|     12|    default:
  ------------------
  |  Branch (489:5): [True: 12, False: 6.17k]
  ------------------
  490|     12|      *nextTokPtr = ptr;
  491|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  492|  6.18k|    }
  493|  25.3k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  6.17k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  19.1k|#  define MINBPC(enc) 2
  ------------------
  494|  25.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  25.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  25.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  25.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 25.3k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  13.2k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 13.2k, False: 12.0k]
  ------------------
  496|  19.1k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 5.90k, False: 19.4k]
  ------------------
  497|  19.1k|        break;
  498|  6.13k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 6.13k, False: 19.2k]
  ------------------
  499|  6.13k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.13k|#  define MINBPC(enc) 2
  ------------------
  500|  6.13k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  6.13k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     28|      default:
  ------------------
  |  Branch (501:7): [True: 28, False: 25.3k]
  ------------------
  502|     28|        *nextTokPtr = ptr;
  503|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  504|  25.3k|      }
  505|  25.3k|    }
  506|  6.17k|  }
  507|     14|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  6.18k|}
xmltok.c:big2_cdataSectionTok:
  356|  21.6k|                        const char **nextTokPtr) {
  357|  21.6k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 158, False: 21.5k]
  ------------------
  358|    158|    return XML_TOK_NONE;
  ------------------
  |  |   51|    158|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  21.5k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  21.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  21.5k|    size_t n = end - ptr;
  361|  21.5k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  21.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 3.98k, False: 17.5k]
  ------------------
  362|  3.98k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  3.98k|#  define MINBPC(enc) 2
  ------------------
  363|  3.98k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 18, False: 3.96k]
  ------------------
  364|     18|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  3.96k|      end = ptr + n;
  366|  3.96k|    }
  367|  21.5k|  }
  368|  21.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  21.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  21.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 18.2k, False: 3.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  6.39k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 6.39k, False: 15.1k]
  ------------------
  370|  6.39k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.39k|#  define MINBPC(enc) 2
  ------------------
  371|  6.39k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.39k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.39k|    {                                                                          \
  |  |  |  |  135|  6.39k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.39k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 6.39k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  6.39k|    }
  |  |  ------------------
  ------------------
  372|  6.39k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  6.39k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.39k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.67k, False: 1.71k]
  |  |  |  |  |  Branch (872:49): [True: 2.47k, False: 2.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  3.91k|      break;
  374|  2.47k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.47k|#  define MINBPC(enc) 2
  ------------------
  375|  2.47k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.47k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.47k|    {                                                                          \
  |  |  |  |  135|  2.47k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.47k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.47k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 2.46k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  2.47k|    }
  |  |  ------------------
  ------------------
  376|  2.46k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.46k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.46k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.61k, False: 851]
  |  |  |  |  |  Branch (872:49): [True: 307, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  2.16k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  2.16k|#  define MINBPC(enc) 2
  ------------------
  378|  2.16k|      break;
  379|  2.16k|    }
  380|    307|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    307|#  define MINBPC(enc) 2
  ------------------
  381|    307|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    307|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  6.57k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 6.57k, False: 14.9k]
  ------------------
  383|  6.57k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.57k|#  define MINBPC(enc) 2
  ------------------
  384|  6.57k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.57k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.57k|    {                                                                          \
  |  |  |  |  135|  6.57k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.57k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.57k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 6.56k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  6.57k|    }
  |  |  ------------------
  ------------------
  385|  6.56k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  6.56k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.56k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.98k, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 710, False: 5.85k]
  ------------------
  386|    710|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    710|#  define MINBPC(enc) 2
  ------------------
  387|  6.56k|    *nextTokPtr = ptr;
  388|  6.56k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.56k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  3.00k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 3.00k, False: 18.4k]
  ------------------
  390|  3.00k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.00k|#  define MINBPC(enc) 2
  ------------------
  391|  3.00k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.00k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  3.08k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.51k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.45k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.51k, False: 19.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.51k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 58, False: 1.45k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.45k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     58|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.45k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.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|  1.45k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.45k|    break;
  |  |  ------------------
  |  |   63|  1.45k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 62, False: 21.4k]
  |  |  ------------------
  |  |   64|     62|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 21.4k]
  |  |  ------------------
  |  |   65|     71|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 21.4k]
  |  |  ------------------
  |  |   66|     71|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     71|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     71|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  3.93k|  default:
  ------------------
  |  Branch (393:3): [True: 3.93k, False: 17.5k]
  ------------------
  394|  3.93k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.93k|#  define MINBPC(enc) 2
  ------------------
  395|  3.93k|    break;
  396|  21.4k|  }
  397|  1.04M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.04M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.04M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.04M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  43.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 43.7k, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.04M]
  |  |  ------------------
  |  |  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.04M]
  |  |  ------------------
  |  |  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|  33.2k|      LEAD_CASE(4)
  ------------------
  |  |  400|  33.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 33.2k, False: 1.01M]
  |  |  ------------------
  |  |  401|  33.2k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  33.2k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 53, False: 33.2k]
  |  |  ------------------
  |  |  402|     53|      *nextTokPtr = ptr;                                                       \
  |  |  403|     53|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     53|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     53|    }                                                                          \
  |  |  405|  33.2k|    ptr += n;                                                                  \
  |  |  406|  33.2k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     56|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 56, False: 1.04M]
  ------------------
  412|     56|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.04M]
  ------------------
  413|     62|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 6, False: 1.04M]
  ------------------
  414|  4.74k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 4.68k, False: 1.04M]
  ------------------
  415|  6.97k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 2.23k, False: 1.04M]
  ------------------
  416|  11.2k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 4.28k, False: 1.04M]
  ------------------
  417|  11.2k|      *nextTokPtr = ptr;
  418|  11.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  11.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.00M|    default:
  ------------------
  |  Branch (419:5): [True: 1.00M, False: 44.5k]
  ------------------
  420|  1.00M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.00M|#  define MINBPC(enc) 2
  ------------------
  421|  1.00M|      break;
  422|  1.04M|    }
  423|  1.04M|  }
  424|    149|  *nextTokPtr = ptr;
  425|    149|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    149|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  11.4k|}
xmltok.c:big2_attributeValueTok:
 1262|   305k|                          const char **nextTokPtr) {
 1263|   305k|  const char *start;
 1264|   305k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 6.35k, False: 298k]
  ------------------
 1265|  6.35k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  6.35k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   298k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   298k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   298k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   298k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 298k]
  ------------------
 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|   298k|  start = ptr;
 1275|  6.44M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  6.44M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.44M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.44M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   497k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 497k, False: 5.94M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|      0|      LEAD_CASE(2)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 6.44M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 6.44M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|   112k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   112k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 112k, False: 6.33M]
  |  |  ------------------
  |  | 1279|   112k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   112k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   138k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 138k, False: 6.30M]
  ------------------
 1286|   138k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 96.0k, False: 42.8k]
  ------------------
 1287|  96.0k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  96.0k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  96.0k|#  define MINBPC(enc) 2
  ------------------
 1288|  42.8k|      *nextTokPtr = ptr;
 1289|  42.8k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  42.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 6.44M]
  ------------------
 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|  27.2k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 27.2k, False: 6.41M]
  ------------------
 1295|  27.2k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 15.9k, False: 11.2k]
  ------------------
 1296|  15.9k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  15.9k|#  define MINBPC(enc) 2
  ------------------
 1297|  15.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  15.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  15.9k|      }
 1299|  11.2k|      *nextTokPtr = ptr;
 1300|  11.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  11.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|   113k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 113k, False: 6.33M]
  ------------------
 1302|   113k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 60.8k, False: 52.9k]
  ------------------
 1303|  60.8k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  60.8k|#  define MINBPC(enc) 2
  ------------------
 1304|  60.8k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  60.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  60.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  60.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 333, False: 60.4k]
  ------------------
 1305|    333|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    333|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  60.4k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  60.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  60.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  36.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 36.9k, False: 23.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 5.29k, False: 55.1k]
  ------------------
 1307|  5.29k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.29k|#  define MINBPC(enc) 2
  ------------------
 1308|  60.4k|        *nextTokPtr = ptr;
 1309|  60.4k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  60.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  60.8k|      }
 1311|  52.9k|      *nextTokPtr = ptr;
 1312|  52.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  52.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  14.6k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 14.6k, False: 6.42M]
  ------------------
 1314|  14.6k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 9.44k, False: 5.25k]
  ------------------
 1315|  9.44k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  9.44k|#  define MINBPC(enc) 2
  ------------------
 1316|  9.44k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  9.44k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  9.44k|      }
 1318|  5.25k|      *nextTokPtr = ptr;
 1319|  5.25k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.25k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  6.03M|    default:
  ------------------
  |  Branch (1320:5): [True: 6.03M, False: 407k]
  ------------------
 1321|  6.03M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.03M|#  define MINBPC(enc) 2
  ------------------
 1322|  6.03M|      break;
 1323|  6.44M|    }
 1324|  6.44M|  }
 1325|  4.16k|  *nextTokPtr = ptr;
 1326|  4.16k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.16k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   298k|}
xmltok.c:big2_entityValueTok:
 1331|  99.7k|                       const char **nextTokPtr) {
 1332|  99.7k|  const char *start;
 1333|  99.7k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.31k, False: 97.4k]
  ------------------
 1334|  2.31k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.31k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  97.4k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  97.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  97.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  97.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 97.4k]
  ------------------
 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|  97.4k|  start = ptr;
 1344|  39.2M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  39.2M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  39.2M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  39.2M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   400k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 400k, False: 38.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 39.2M]
  |  |  ------------------
  |  | 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: 39.2M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   307k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   307k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 307k, False: 38.9M]
  |  |  ------------------
  |  | 1348|   307k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   307k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  6.58k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 6.58k, False: 39.2M]
  ------------------
 1355|  6.58k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 3.67k, False: 2.91k]
  ------------------
 1356|  3.67k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.67k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.67k|#  define MINBPC(enc) 2
  ------------------
 1357|  2.91k|      *nextTokPtr = ptr;
 1358|  2.91k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.91k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      6|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 6, False: 39.2M]
  ------------------
 1360|      6|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 1]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      5|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      5|#  define MINBPC(enc) 2
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 4]
  ------------------
 1363|      5|      }
 1364|      1|      *nextTokPtr = ptr;
 1365|      1|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      1|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  32.8k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 32.8k, False: 39.1M]
  ------------------
 1367|  32.8k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 18.6k, False: 14.2k]
  ------------------
 1368|  18.6k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  18.6k|#  define MINBPC(enc) 2
  ------------------
 1369|  18.6k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  18.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  18.6k|      }
 1371|  14.2k|      *nextTokPtr = ptr;
 1372|  14.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  14.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  56.1k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 56.1k, False: 39.1M]
  ------------------
 1374|  56.1k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 31.3k, False: 24.8k]
  ------------------
 1375|  31.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  31.3k|#  define MINBPC(enc) 2
  ------------------
 1376|  31.3k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  31.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  31.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  31.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 373, False: 30.9k]
  ------------------
 1377|    373|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    373|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  30.9k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  30.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  30.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 21.9k, False: 9.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 3.57k, False: 27.3k]
  ------------------
 1379|  3.57k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.57k|#  define MINBPC(enc) 2
  ------------------
 1380|  30.9k|        *nextTokPtr = ptr;
 1381|  30.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  30.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  31.3k|      }
 1383|  24.8k|      *nextTokPtr = ptr;
 1384|  24.8k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  24.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  38.8M|    default:
  ------------------
  |  Branch (1385:5): [True: 38.8M, False: 402k]
  ------------------
 1386|  38.8M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  38.8M|#  define MINBPC(enc) 2
  ------------------
 1387|  38.8M|      break;
 1388|  39.2M|    }
 1389|  39.2M|  }
 1390|  1.84k|  *nextTokPtr = ptr;
 1391|  1.84k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.84k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  97.4k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  55.4k|                         const char *end1, const char *ptr2) {
 1716|  55.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  55.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   219k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|   164k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 187k, False: 32.0k]
  ------------------
 1718|   187k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|   187k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 27, False: 187k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     27|      return 0; /* LCOV_EXCL_LINE */
 1725|     27|    }
 1726|   187k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|   187k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|   187k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 187k, False: 29]
  |  |  |  |  |  Branch (872:49): [True: 164k, False: 23.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  23.3k|      return 0;
 1728|   187k|  }
 1729|  32.0k|  return ptr1 == end1;
 1730|  55.4k|}
xmltok.c:big2_nameLength:
 1733|  17.6k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  17.6k|  const char *start = ptr;
 1735|  63.9k|  for (;;) {
 1736|  63.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  63.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  63.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  35.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 35.3k, False: 28.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 63.9k]
  |  |  ------------------
  |  | 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: 63.9k]
  |  |  ------------------
  |  | 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: 63.9k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  28.6k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 28.6k, False: 35.3k]
  ------------------
 1746|  39.4k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 10.8k, False: 53.1k]
  ------------------
 1747|  39.4k|#  ifdef XML_NS
 1748|  39.4k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 63.9k]
  ------------------
 1749|  39.4k|#  endif
 1750|  45.9k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 6.44k, False: 57.5k]
  ------------------
 1751|  46.0k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 143, False: 63.8k]
  ------------------
 1752|  46.2k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 178, False: 63.8k]
  ------------------
 1753|  46.3k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 59, False: 63.9k]
  ------------------
 1754|  46.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  46.3k|#  define MINBPC(enc) 2
  ------------------
 1755|  46.3k|      break;
 1756|  17.6k|    default:
  ------------------
  |  Branch (1756:5): [True: 17.6k, False: 46.3k]
  ------------------
 1757|  17.6k|      return (int)(ptr - start);
 1758|  63.9k|    }
 1759|  63.9k|  }
 1760|  17.6k|}
xmltok.c:big2_getAtts:
 1510|  11.3k|                ATTRIBUTE *atts) {
 1511|  11.3k|  enum { other, inName, inValue } state = inName;
 1512|  11.3k|  int nAtts = 0;
 1513|  11.3k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  12.2M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  11.3k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  12.2M|#  define MINBPC(enc) 2
  ------------------
 1517|  12.2M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  12.2M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.2M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.40M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.40M, False: 9.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 12.2M]
  |  |  ------------------
  |  | 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: 12.2M]
  |  |  ------------------
  |  | 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|  89.3k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  89.3k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 89.3k, False: 12.1M]
  |  |  ------------------
  |  | 1528|  89.3k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  89.3k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 89.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|  89.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  89.3k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  9.75M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 9.75M, False: 2.49M]
  ------------------
 1535|  10.1M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 395k, False: 11.8M]
  ------------------
 1536|  10.3M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 176k, False: 12.0M]
  ------------------
 1537|  10.3M|      START_NAME
  ------------------
  |  | 1519|  10.3M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 351k, False: 9.97M]
  |  |  ------------------
  |  | 1520|   351k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 179k, False: 172k]
  |  |  ------------------
  |  | 1521|   179k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   179k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   179k|      }                                                                        \
  |  | 1524|   351k|      state = inName;                                                          \
  |  | 1525|   351k|    }
  ------------------
 1538|  10.3M|      break;
 1539|      0|#  undef START_NAME
 1540|   692k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 692k, False: 11.5M]
  ------------------
 1541|   692k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 343k, False: 349k]
  ------------------
 1542|   343k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 173k, False: 169k]
  ------------------
 1543|   173k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   173k|#  define MINBPC(enc) 2
  ------------------
 1544|   343k|        state = inValue;
 1545|   343k|        open = BT_QUOT;
 1546|   349k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 343k, False: 5.44k]
  ------------------
 1547|   343k|        state = other;
 1548|   343k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 173k, False: 169k]
  ------------------
 1549|   173k|          atts[nAtts].valueEnd = ptr;
 1550|   343k|        nAtts++;
 1551|   343k|      }
 1552|   692k|      break;
 1553|  17.2k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 17.2k, False: 12.2M]
  ------------------
 1554|  17.2k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 8.30k, False: 8.90k]
  ------------------
 1555|  8.30k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 5.86k, False: 2.43k]
  ------------------
 1556|  5.86k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.86k|#  define MINBPC(enc) 2
  ------------------
 1557|  8.30k|        state = inValue;
 1558|  8.30k|        open = BT_APOS;
 1559|  8.90k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 8.30k, False: 601]
  ------------------
 1560|  8.30k|        state = other;
 1561|  8.30k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 5.86k, False: 2.43k]
  ------------------
 1562|  5.86k|          atts[nAtts].valueEnd = ptr;
 1563|  8.30k|        nAtts++;
 1564|  8.30k|      }
 1565|  17.2k|      break;
 1566|   100k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 100k, False: 12.1M]
  ------------------
 1567|   100k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 99.2k, False: 1.11k]
  ------------------
 1568|  99.2k|        atts[nAtts].normalized = 0;
 1569|   100k|      break;
 1570|  29.9k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 29.9k, False: 12.2M]
  ------------------
 1571|  29.9k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.56k, False: 27.3k]
  ------------------
 1572|  2.56k|        state = other;
 1573|  27.3k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 13.6k, False: 13.6k]
  |  Branch (1573:36): [True: 12.3k, False: 1.37k]
  |  Branch (1573:55): [True: 4.40k, False: 7.91k]
  ------------------
 1574|  27.3k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 1.49k, False: 2.90k]
  ------------------
 1575|  4.40k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|  2.90k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.90k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.90k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  7.30k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 200, False: 2.70k]
  ------------------
 1576|  4.40k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|  2.70k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.70k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.36k, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  7.10k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 214, False: 2.49k]
  ------------------
 1577|  4.40k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  2.49k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.49k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.15k, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 295, False: 2.19k]
  ------------------
 1578|  2.20k|        atts[nAtts].normalized = 0;
 1579|  29.9k|      break;
 1580|  57.1k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 57.1k, False: 12.1M]
  ------------------
 1581|   413k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 356k, False: 11.8M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   413k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 3.85k, False: 409k]
  ------------------
 1585|  3.85k|        state = other;
 1586|   409k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 69.0k, False: 340k]
  |  Branch (1586:36): [True: 68.6k, False: 462]
  ------------------
 1587|  68.6k|        atts[nAtts].normalized = 0;
 1588|   413k|      break;
 1589|  13.5k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 13.5k, False: 12.2M]
  ------------------
 1590|  21.1k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 7.58k, False: 12.2M]
  ------------------
 1591|  21.1k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 11.3k, False: 9.85k]
  ------------------
 1592|  11.3k|        return nAtts;
 1593|  9.85k|      break;
 1594|   559k|    default:
  ------------------
  |  Branch (1594:5): [True: 559k, False: 11.6M]
  ------------------
 1595|   559k|      break;
 1596|  12.2M|    }
 1597|  12.2M|  }
 1598|       |  /* not reached */
 1599|  11.3k|}
xmltok.c:big2_charRefNumber:
 1602|  5.60k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  5.60k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  5.60k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.60k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  5.60k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  5.60k|#  define MINBPC(enc) 2
  ------------------
 1607|  5.60k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  5.60k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.60k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.60k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 4.74k, False: 857]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  23.6k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  4.74k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  23.6k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  23.6k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 23.6k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 4.72k, False: 18.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  18.9k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  18.8k|#  define MINBPC(enc) 2
  ------------------
 1610|  18.9k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  18.9k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  18.9k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 18.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  18.9k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 18.9k]
  ------------------
 1612|    443|      case ASCII_0:
  ------------------
  |  |   90|    443|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 443, False: 18.4k]
  ------------------
 1613|  1.05k|      case ASCII_1:
  ------------------
  |  |   91|  1.05k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 607, False: 18.3k]
  ------------------
 1614|  1.97k|      case ASCII_2:
  ------------------
  |  |   92|  1.97k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 927, False: 17.9k]
  ------------------
 1615|  2.74k|      case ASCII_3:
  ------------------
  |  |   93|  2.74k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 769, False: 18.1k]
  ------------------
 1616|  4.05k|      case ASCII_4:
  ------------------
  |  |   94|  4.05k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 1.30k, False: 17.6k]
  ------------------
 1617|  7.77k|      case ASCII_5:
  ------------------
  |  |   95|  7.77k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 3.72k, False: 15.1k]
  ------------------
 1618|  9.12k|      case ASCII_6:
  ------------------
  |  |   96|  9.12k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 1.35k, False: 17.5k]
  ------------------
 1619|  9.46k|      case ASCII_7:
  ------------------
  |  |   97|  9.46k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 342, False: 18.5k]
  ------------------
 1620|  9.83k|      case ASCII_8:
  ------------------
  |  |   98|  9.83k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 366, False: 18.5k]
  ------------------
 1621|  11.2k|      case ASCII_9:
  ------------------
  |  |   99|  11.2k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 1.46k, False: 17.4k]
  ------------------
 1622|  11.2k|        result <<= 4;
 1623|  11.2k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  11.2k|#define ASCII_0 0x30
  ------------------
 1624|  11.2k|        break;
 1625|    304|      case ASCII_A:
  ------------------
  |  |   36|    304|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 304, False: 18.6k]
  ------------------
 1626|    869|      case ASCII_B:
  ------------------
  |  |   37|    869|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 565, False: 18.3k]
  ------------------
 1627|  1.35k|      case ASCII_C:
  ------------------
  |  |   38|  1.35k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 487, False: 18.4k]
  ------------------
 1628|  2.22k|      case ASCII_D:
  ------------------
  |  |   39|  2.22k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 872, False: 18.0k]
  ------------------
 1629|  2.44k|      case ASCII_E:
  ------------------
  |  |   40|  2.44k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 217, False: 18.6k]
  ------------------
 1630|  3.31k|      case ASCII_F:
  ------------------
  |  |   41|  3.31k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 870, False: 18.0k]
  ------------------
 1631|  3.31k|        result <<= 4;
 1632|  3.31k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.31k|#define ASCII_A 0x41
  ------------------
 1633|  3.31k|        break;
 1634|  1.00k|      case ASCII_a:
  ------------------
  |  |   63|  1.00k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 1.00k, False: 17.9k]
  ------------------
 1635|  1.48k|      case ASCII_b:
  ------------------
  |  |   64|  1.48k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 477, False: 18.4k]
  ------------------
 1636|  2.09k|      case ASCII_c:
  ------------------
  |  |   65|  2.09k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 605, False: 18.3k]
  ------------------
 1637|  2.98k|      case ASCII_d:
  ------------------
  |  |   66|  2.98k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 892, False: 18.0k]
  ------------------
 1638|  3.95k|      case ASCII_e:
  ------------------
  |  |   67|  3.95k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 975, False: 17.9k]
  ------------------
 1639|  4.30k|      case ASCII_f:
  ------------------
  |  |   68|  4.30k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 342, False: 18.5k]
  ------------------
 1640|  4.30k|        result <<= 4;
 1641|  4.30k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  4.30k|#define ASCII_a 0x61
  ------------------
 1642|  4.30k|        break;
 1643|  18.9k|      }
 1644|  18.9k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 24, False: 18.8k]
  ------------------
 1645|     24|        return -1;
 1646|  18.9k|    }
 1647|  4.74k|  } else {
 1648|  3.86k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  3.86k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.86k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.86k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 852, False: 3.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.00k|#  define MINBPC(enc) 2
  ------------------
 1649|  3.01k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  3.01k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.01k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.01k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  3.01k|      result *= 10;
 1651|  3.01k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.01k|#define ASCII_0 0x30
  ------------------
 1652|  3.01k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 5, False: 3.00k]
  ------------------
 1653|      5|        return -1;
 1654|  3.01k|    }
 1655|    857|  }
 1656|  5.57k|  return checkCharRefNumber(result);
 1657|  5.60k|}
xmltok.c:big2_predefinedEntityName:
 1661|   107k|                             const char *end) {
 1662|   107k|  UNUSED_P(enc);
  ------------------
  |  |  135|   107k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|   107k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|   107k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 99.2k, False: 8.29k]
  ------------------
 1664|  1.42k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.42k, False: 106k]
  ------------------
 1665|  1.42k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  1.42k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.42k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.19k, False: 230]
  |  |  |  |  |  Branch (872:49): [True: 599, False: 595]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    599|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    599|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    599|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 244, False: 355]
  |  |  |  |  |  Branch (871:32): [True: 398, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    294|      case ASCII_l:
  ------------------
  |  |   74|    294|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 294, False: 305]
  ------------------
 1668|    294|        return ASCII_LT;
  ------------------
  |  |  111|    294|#define ASCII_LT 0x3C
  ------------------
 1669|     61|      case ASCII_g:
  ------------------
  |  |   69|     61|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 61, False: 538]
  ------------------
 1670|     61|        return ASCII_GT;
  ------------------
  |  |  113|     61|#define ASCII_GT 0x3E
  ------------------
 1671|    599|      }
 1672|    599|    }
 1673|  1.06k|    break;
 1674|  1.64k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.64k, False: 105k]
  ------------------
 1675|  1.64k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.64k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.64k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.40k, False: 235]
  |  |  |  |  |  Branch (872:49): [True: 1.02k, False: 382]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.02k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.02k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.02k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.02k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.02k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 829, False: 198]
  |  |  |  |  |  Branch (872:49): [True: 607, False: 222]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    607|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    607|#  define MINBPC(enc) 2
  ------------------
 1679|    607|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    607|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    607|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 401, False: 206]
  |  |  |  |  |  Branch (872:49): [True: 198, False: 203]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    198|          return ASCII_AMP;
  ------------------
  |  |  105|    198|#define ASCII_AMP 0x26
  ------------------
 1681|    607|      }
 1682|  1.02k|    }
 1683|  1.44k|    break;
 1684|  5.22k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 5.22k, False: 102k]
  ------------------
 1685|  5.22k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  5.22k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  5.22k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 402, False: 4.82k]
  |  |  |  |  |  Branch (871:32): [True: 4.93k, False: 290]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  2.66k|    case ASCII_q:
  ------------------
  |  |   79|  2.66k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 2.66k, False: 2.55k]
  ------------------
 1687|  2.66k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.66k|#  define MINBPC(enc) 2
  ------------------
 1688|  2.66k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  2.66k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.66k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.47k, False: 195]
  |  |  |  |  |  Branch (872:49): [True: 2.26k, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  2.26k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.26k|#  define MINBPC(enc) 2
  ------------------
 1690|  2.26k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  2.26k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.26k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.05k, False: 212]
  |  |  |  |  |  Branch (872:49): [True: 1.86k, False: 196]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|  1.86k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.86k|#  define MINBPC(enc) 2
  ------------------
 1692|  1.86k|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|  1.86k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.86k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.53k, False: 323]
  |  |  |  |  |  Branch (872:49): [True: 1.31k, False: 224]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|  1.31k|            return ASCII_QUOT;
  ------------------
  |  |  104|  1.31k|#define ASCII_QUOT 0x22
  ------------------
 1694|  1.86k|        }
 1695|  2.26k|      }
 1696|  1.35k|      break;
 1697|  2.15k|    case ASCII_a:
  ------------------
  |  |   63|  2.15k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 2.15k, False: 3.06k]
  ------------------
 1698|  2.15k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.15k|#  define MINBPC(enc) 2
  ------------------
 1699|  2.15k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  2.15k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.15k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.50k, False: 651]
  |  |  |  |  |  Branch (872:49): [True: 1.27k, False: 232]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.27k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.27k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.27k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.27k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.27k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.06k, False: 204]
  |  |  |  |  |  Branch (872:49): [True: 871, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    871|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    871|#  define MINBPC(enc) 2
  ------------------
 1703|    871|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|    871|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    871|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 405, False: 466]
  |  |  |  |  |  Branch (872:49): [True: 201, False: 204]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    201|            return ASCII_APOS;
  ------------------
  |  |  106|    201|#define ASCII_APOS 0x27
  ------------------
 1705|    871|        }
 1706|  1.27k|      }
 1707|  1.95k|      break;
 1708|  5.22k|    }
 1709|   107k|  }
 1710|   105k|  return 0;
 1711|   107k|}
xmltok.c:big2_updatePosition:
 1779|  3.55k|                       POSITION *pos) {
 1780|  4.12M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  4.12M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.12M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.12M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   433k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 433k, False: 3.68M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 4.12M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 4.12M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   305k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   305k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 305k, False: 3.81M]
  |  |  ------------------
  |  | 1784|   305k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   305k|    pos->columnNumber++;                                                       \
  |  | 1786|   305k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  17.9k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 17.9k, False: 4.10M]
  ------------------
 1792|  17.9k|      pos->columnNumber = 0;
 1793|  17.9k|      pos->lineNumber++;
 1794|  17.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  17.9k|#  define MINBPC(enc) 2
  ------------------
 1795|  17.9k|      break;
 1796|  30.7k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 30.7k, False: 4.09M]
  ------------------
 1797|  30.7k|      pos->lineNumber++;
 1798|  30.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  30.7k|#  define MINBPC(enc) 2
  ------------------
 1799|  30.7k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  30.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  61.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  30.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 30.7k, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  30.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  30.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  23.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 23.1k, False: 7.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 2.66k, False: 28.0k]
  ------------------
 1800|  2.66k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.66k|#  define MINBPC(enc) 2
  ------------------
 1801|  30.7k|      pos->columnNumber = 0;
 1802|  30.7k|      break;
 1803|  3.76M|    default:
  ------------------
  |  Branch (1803:5): [True: 3.76M, False: 354k]
  ------------------
 1804|  3.76M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.76M|#  define MINBPC(enc) 2
  ------------------
 1805|  3.76M|      pos->columnNumber++;
 1806|  3.76M|      break;
 1807|  4.12M|    }
 1808|  4.12M|  }
 1809|  3.55k|}
xmltok.c:big2_isPublicId:
 1450|    799|                   const char **badPtr) {
 1451|    799|  ptr += MINBPC(enc);
  ------------------
  |  |  916|    799|#  define MINBPC(enc) 2
  ------------------
 1452|    799|  end -= MINBPC(enc);
  ------------------
  |  |  916|    799|#  define MINBPC(enc) 2
  ------------------
 1453|  8.59k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  8.55k|#  define MINBPC(enc) 2
  ------------------
 1454|  8.59k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.59k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.59k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.57k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.57k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    513|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 513, False: 8.08k]
  ------------------
 1456|  1.37k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 862, False: 7.73k]
  ------------------
 1457|  1.76k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 393, False: 8.20k]
  ------------------
 1458|  2.12k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 359, False: 8.23k]
  ------------------
 1459|  2.45k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 326, False: 8.26k]
  ------------------
 1460|  2.72k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 271, False: 8.32k]
  ------------------
 1461|  3.22k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 496, False: 8.09k]
  ------------------
 1462|  3.59k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 377, False: 8.21k]
  ------------------
 1463|  3.80k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 207, False: 8.38k]
  ------------------
 1464|  4.09k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 292, False: 8.30k]
  ------------------
 1465|  4.44k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 353, False: 8.24k]
  ------------------
 1466|  4.65k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 203, False: 8.39k]
  ------------------
 1467|  4.96k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 310, False: 8.28k]
  ------------------
 1468|  5.52k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 563, False: 8.03k]
  ------------------
 1469|  5.76k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 238, False: 8.35k]
  ------------------
 1470|  6.06k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 297, False: 8.29k]
  ------------------
 1471|  6.28k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 224, False: 8.36k]
  ------------------
 1472|  6.70k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 416, False: 8.17k]
  ------------------
 1473|  6.70k|#  ifdef XML_NS
 1474|  6.70k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 8.59k]
  ------------------
 1475|  6.70k|#  endif
 1476|  6.70k|      break;
 1477|    280|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 280, False: 8.31k]
  ------------------
 1478|    280|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|    280|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    280|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 280, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 279]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    279|      break;
 1483|    279|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 269, False: 8.32k]
  ------------------
 1484|  1.03k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 768, False: 7.82k]
  ------------------
 1485|  1.03k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|  1.03k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.03k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.03k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 1.02k, False: 10]
  ------------------
 1486|  1.02k|        break;
 1487|       |      /* fall through */
 1488|    586|    default:
  ------------------
  |  Branch (1488:5): [True: 576, False: 8.01k]
  ------------------
 1489|    586|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    586|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    586|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 565, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    308|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 308, False: 278]
  ------------------
 1491|    551|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 243, False: 343]
  ------------------
 1492|    551|        break;
 1493|     35|      default:
  ------------------
  |  Branch (1493:7): [True: 35, False: 551]
  ------------------
 1494|     35|        *badPtr = ptr;
 1495|     35|        return 0;
 1496|    586|      }
 1497|    551|      break;
 1498|  8.59k|    }
 1499|  8.59k|  }
 1500|    763|  return 1;
 1501|    799|}

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

