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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  20.0k|sip_tokey(struct sipkey *key, const void *src) {
  149|  20.0k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  20.0k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  20.0k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  20.0k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  20.0k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  20.0k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  20.0k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  20.0k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  20.0k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  20.0k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  20.0k|  return key;
  152|  20.0k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  20.0k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  20.0k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  20.0k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  20.0k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  20.0k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  20.0k|sip24_final(struct siphash *H) {
  232|  20.0k|  const char left = (char)(H->p - H->buf);
  233|  20.0k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  20.0k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 20.0k]
  ------------------
  236|  1.26k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.26k, False: 18.7k]
  ------------------
  237|  1.26k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  5.25k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.98k, False: 16.0k]
  ------------------
  240|  5.25k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  6.42k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.17k, False: 18.8k]
  ------------------
  243|  6.42k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  10.3k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.94k, False: 16.1k]
  ------------------
  246|  10.3k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  11.5k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.20k, False: 18.8k]
  ------------------
  249|  11.5k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  15.0k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.49k, False: 16.5k]
  ------------------
  252|  15.0k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  16.3k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.24k, False: 18.8k]
  ------------------
  255|  16.3k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  20.0k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.75k, False: 16.3k]
  ------------------
  258|  20.0k|    break;
  259|  20.0k|  }
  260|       |
  261|  20.0k|  H->v3 ^= b;
  262|  20.0k|  sip_round(H, 2);
  263|  20.0k|  H->v0 ^= b;
  264|  20.0k|  H->v2 ^= 0xff;
  265|  20.0k|  sip_round(H, 4);
  266|       |
  267|  20.0k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  20.0k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  40.1M|sip_round(struct siphash *H, const int rounds) {
  168|  40.1M|  int i;
  169|       |
  170|   120M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 80.2M, False: 40.1M]
  ------------------
  171|  80.2M|    H->v0 += H->v1;
  172|  80.2M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  80.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  80.2M|    H->v1 ^= H->v0;
  174|  80.2M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  80.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  80.2M|    H->v2 += H->v3;
  177|  80.2M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  80.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  80.2M|    H->v3 ^= H->v2;
  179|       |
  180|  80.2M|    H->v0 += H->v3;
  181|  80.2M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  80.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  80.2M|    H->v3 ^= H->v0;
  183|       |
  184|  80.2M|    H->v2 += H->v1;
  185|  80.2M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  80.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  80.2M|    H->v1 ^= H->v2;
  187|  80.2M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  80.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  80.2M|  }
  189|  40.1M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  20.0k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  20.0k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  20.0k|  uint64_t m;
  210|       |
  211|  40.0M|  do {
  212|   360M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   360M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 360M, False: 20.0k]
  |  Branch (212:22): [True: 320M, False: 40.0M]
  ------------------
  213|   320M|      *H->p++ = *p++;
  214|       |
  215|  40.0M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  40.0M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 16.3k, False: 40.0M]
  ------------------
  216|  16.3k|      break;
  217|       |
  218|  40.0M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  40.0M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  40.0M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  40.0M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  40.0M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  40.0M|    H->v3 ^= m;
  220|  40.0M|    sip_round(H, 2);
  221|  40.0M|    H->v0 ^= m;
  222|       |
  223|  40.0M|    H->p = H->buf;
  224|  40.0M|    H->c += 8;
  225|  40.0M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 40.0M, False: 3.75k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  20.0k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  20.0k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  20.0k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  20.0k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  20.0k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  20.0k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  20.0k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  20.0k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  20.0k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  20.0k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  20.0k|  H->p = H->buf;
  199|  20.0k|  H->c = 0;
  200|       |
  201|  20.0k|  return H;
  202|  20.0k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  3.95M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  3.95M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  3.95M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  3.95M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  3.95M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  3.95M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  3.95M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  3.95M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  3.95M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  3.95M|  H->p = H->buf;
  199|  3.95M|  H->c = 0;
  200|       |
  201|  3.95M|  return H;
  202|  3.95M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  3.95M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  3.95M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  3.95M|  uint64_t m;
  210|       |
  211|  4.55M|  do {
  212|  14.5M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  10.5M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 10.5M, False: 3.95M]
  |  Branch (212:22): [True: 9.95M, False: 600k]
  ------------------
  213|  9.95M|      *H->p++ = *p++;
  214|       |
  215|  4.55M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  4.55M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 3.94M, False: 603k]
  ------------------
  216|  3.94M|      break;
  217|       |
  218|   603k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   603k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   603k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   603k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   603k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   603k|    H->v3 ^= m;
  220|   603k|    sip_round(H, 2);
  221|   603k|    H->v0 ^= m;
  222|       |
  223|   603k|    H->p = H->buf;
  224|   603k|    H->c += 8;
  225|   603k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 600k, False: 3.44k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  3.95M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  8.50M|sip_round(struct siphash *H, const int rounds) {
  168|  8.50M|  int i;
  169|       |
  170|  33.4M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 24.9M, False: 8.50M]
  ------------------
  171|  24.9M|    H->v0 += H->v1;
  172|  24.9M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  24.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  24.9M|    H->v1 ^= H->v0;
  174|  24.9M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  24.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  24.9M|    H->v2 += H->v3;
  177|  24.9M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  24.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  24.9M|    H->v3 ^= H->v2;
  179|       |
  180|  24.9M|    H->v0 += H->v3;
  181|  24.9M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  24.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  24.9M|    H->v3 ^= H->v0;
  183|       |
  184|  24.9M|    H->v2 += H->v1;
  185|  24.9M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  24.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  24.9M|    H->v1 ^= H->v2;
  187|  24.9M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  24.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  24.9M|  }
  189|  8.50M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  3.95M|sip24_final(struct siphash *H) {
  232|  3.95M|  const char left = (char)(H->p - H->buf);
  233|  3.95M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  3.95M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 3.95M]
  ------------------
  236|  4.20k|  case 7:
  ------------------
  |  Branch (236:3): [True: 4.20k, False: 3.94M]
  ------------------
  237|  4.20k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  10.6k|  case 6:
  ------------------
  |  Branch (239:3): [True: 6.45k, False: 3.94M]
  ------------------
  240|  10.6k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  77.5k|  case 5:
  ------------------
  |  Branch (242:3): [True: 66.9k, False: 3.88M]
  ------------------
  243|  77.5k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|   203k|  case 4:
  ------------------
  |  Branch (245:3): [True: 126k, False: 3.82M]
  ------------------
  246|   203k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|   311k|  case 3:
  ------------------
  |  Branch (248:3): [True: 107k, False: 3.84M]
  ------------------
  249|   311k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|   569k|  case 2:
  ------------------
  |  Branch (251:3): [True: 258k, False: 3.69M]
  ------------------
  252|   569k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  3.94M|  case 1:
  ------------------
  |  Branch (254:3): [True: 3.37M, False: 573k]
  ------------------
  255|  3.94M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  3.95M|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.67k, False: 3.94M]
  ------------------
  258|  3.95M|    break;
  259|  3.95M|  }
  260|       |
  261|  3.95M|  H->v3 ^= b;
  262|  3.95M|  sip_round(H, 2);
  263|  3.95M|  H->v0 ^= b;
  264|  3.95M|  H->v2 ^= 0xff;
  265|  3.95M|  sip_round(H, 4);
  266|       |
  267|  3.95M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  3.95M|} /* sip24_final() */

XML_ParserCreate:
  718|  20.0k|XML_ParserCreate(const XML_Char *encodingName) {
  719|  20.0k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  720|  20.0k|}
XML_ParserCreate_MM:
  969|  20.0k|                    const XML_Char *nameSep) {
  970|  20.0k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  971|  20.0k|}
XML_ParserFree:
 1440|  20.0k|XML_ParserFree(XML_Parser parser) {
 1441|  20.0k|  TAG *tagList;
 1442|  20.0k|  OPEN_INTERNAL_ENTITY *entityList;
 1443|  20.0k|  if (parser == NULL)
  ------------------
  |  Branch (1443:7): [True: 0, False: 20.0k]
  ------------------
 1444|      0|    return;
 1445|       |  /* free m_tagStack and m_freeTagList */
 1446|  20.0k|  tagList = parser->m_tagStack;
 1447|  3.20M|  for (;;) {
 1448|  3.20M|    TAG *p;
 1449|  3.20M|    if (tagList == NULL) {
  ------------------
  |  Branch (1449:9): [True: 20.2k, False: 3.18M]
  ------------------
 1450|  20.2k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1450:11): [True: 20.0k, False: 218]
  ------------------
 1451|  20.0k|        break;
 1452|    218|      tagList = parser->m_freeTagList;
 1453|    218|      parser->m_freeTagList = NULL;
 1454|    218|    }
 1455|  3.18M|    p = tagList;
 1456|  3.18M|    tagList = tagList->parent;
 1457|  3.18M|    FREE(parser, p->buf);
  ------------------
  |  |  715|  3.18M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1458|  3.18M|    destroyBindings(p->bindings, parser);
 1459|  3.18M|    FREE(parser, p);
  ------------------
  |  |  715|  3.18M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1460|  3.18M|  }
 1461|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1462|  20.0k|  entityList = parser->m_openInternalEntities;
 1463|  21.8k|  for (;;) {
 1464|  21.8k|    OPEN_INTERNAL_ENTITY *openEntity;
 1465|  21.8k|    if (entityList == NULL) {
  ------------------
  |  Branch (1465:9): [True: 20.6k, False: 1.12k]
  ------------------
 1466|  20.6k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1466:11): [True: 20.0k, False: 638]
  ------------------
 1467|  20.0k|        break;
 1468|    638|      entityList = parser->m_freeInternalEntities;
 1469|    638|      parser->m_freeInternalEntities = NULL;
 1470|    638|    }
 1471|  1.75k|    openEntity = entityList;
 1472|  1.75k|    entityList = entityList->next;
 1473|  1.75k|    FREE(parser, openEntity);
  ------------------
  |  |  715|  1.75k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1474|  1.75k|  }
 1475|       |
 1476|  20.0k|  destroyBindings(parser->m_freeBindingList, parser);
 1477|  20.0k|  destroyBindings(parser->m_inheritedBindings, parser);
 1478|  20.0k|  poolDestroy(&parser->m_tempPool);
 1479|  20.0k|  poolDestroy(&parser->m_temp2Pool);
 1480|  20.0k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  715|  20.0k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1481|  20.0k|#ifdef XML_DTD
 1482|       |  /* external parameter entity parsers share the DTD structure
 1483|       |     parser->m_dtd with the root parser, so we must not destroy it
 1484|       |  */
 1485|  20.0k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1485:7): [True: 20.0k, False: 0]
  |  Branch (1485:36): [True: 20.0k, False: 0]
  ------------------
 1486|       |#else
 1487|       |  if (parser->m_dtd)
 1488|       |#endif /* XML_DTD */
 1489|  20.0k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1490|  20.0k|               &parser->m_mem);
 1491|  20.0k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  715|  20.0k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1492|       |#ifdef XML_ATTR_INFO
 1493|       |  FREE(parser, (void *)parser->m_attInfo);
 1494|       |#endif
 1495|  20.0k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  715|  20.0k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1496|  20.0k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|  20.0k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  20.0k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|  20.0k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  20.0k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  715|  20.0k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  20.0k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  715|  20.0k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  20.0k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1500:7): [True: 0, False: 20.0k]
  ------------------
 1501|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1502|  20.0k|  FREE(parser, parser);
  ------------------
  |  |  715|  20.0k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1503|  20.0k|}
XML_SetElementHandler:
 1595|  20.0k|                      XML_EndElementHandler end) {
 1596|  20.0k|  if (parser == NULL)
  ------------------
  |  Branch (1596:7): [True: 0, False: 20.0k]
  ------------------
 1597|      0|    return;
 1598|  20.0k|  parser->m_startElementHandler = start;
 1599|  20.0k|  parser->m_endElementHandler = end;
 1600|  20.0k|}
XML_SetHashSalt:
 1815|  20.0k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1816|  20.0k|  if (parser == NULL)
  ------------------
  |  Branch (1816:7): [True: 0, False: 20.0k]
  ------------------
 1817|      0|    return 0;
 1818|  20.0k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1818:7): [True: 0, False: 20.0k]
  ------------------
 1819|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1820|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1821|  20.0k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1821:7): [True: 0, False: 20.0k]
  ------------------
 1822|  20.0k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1822:10): [True: 0, False: 20.0k]
  ------------------
 1823|      0|    return 0;
 1824|  20.0k|  parser->m_hash_secret_salt = hash_salt;
 1825|  20.0k|  return 1;
 1826|  20.0k|}
XML_ParseBuffer:
 1983|  20.0k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1984|  20.0k|  const char *start;
 1985|  20.0k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  20.0k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1986|       |
 1987|  20.0k|  if (parser == NULL)
  ------------------
  |  Branch (1987:7): [True: 0, False: 20.0k]
  ------------------
 1988|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1989|  20.0k|  switch (parser->m_parsingStatus.parsing) {
 1990|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1990:3): [True: 0, False: 20.0k]
  ------------------
 1991|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1992|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1993|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1993:3): [True: 0, False: 20.0k]
  ------------------
 1994|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1995|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1996|  20.0k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1996:3): [True: 20.0k, False: 0]
  ------------------
 1997|       |    /* Has someone called XML_GetBuffer successfully before? */
 1998|  20.0k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1998:9): [True: 0, False: 20.0k]
  ------------------
 1999|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2000|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2001|      0|    }
 2002|       |
 2003|  20.0k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2003:9): [True: 20.0k, False: 0]
  |  Branch (2003:43): [True: 0, False: 20.0k]
  ------------------
 2004|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2005|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2006|      0|    }
 2007|       |    /* fall through */
 2008|  20.0k|  default:
  ------------------
  |  Branch (2008:3): [True: 0, False: 20.0k]
  ------------------
 2009|  20.0k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2010|  20.0k|  }
 2011|       |
 2012|  20.0k|  start = parser->m_bufferPtr;
 2013|  20.0k|  parser->m_positionPtr = start;
 2014|  20.0k|  parser->m_bufferEnd += len;
 2015|  20.0k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2016|  20.0k|  parser->m_parseEndByteIndex += len;
 2017|  20.0k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2018|       |
 2019|  20.0k|  parser->m_errorCode = parser->m_processor(
 2020|  20.0k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2021|       |
 2022|  20.0k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2022:7): [True: 7.97k, False: 12.0k]
  ------------------
 2023|  7.97k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2024|  7.97k|    parser->m_processor = errorProcessor;
 2025|  7.97k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  7.97k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2026|  12.0k|  } else {
 2027|  12.0k|    switch (parser->m_parsingStatus.parsing) {
 2028|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2028:5): [True: 0, False: 12.0k]
  ------------------
 2029|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2030|      0|      break;
 2031|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2031:5): [True: 0, False: 12.0k]
  ------------------
 2032|  12.0k|    case XML_PARSING:
  ------------------
  |  Branch (2032:5): [True: 12.0k, False: 0]
  ------------------
 2033|  12.0k|      if (isFinal) {
  ------------------
  |  Branch (2033:11): [True: 0, False: 12.0k]
  ------------------
 2034|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2035|      0|        return result;
 2036|      0|      }
 2037|  12.0k|    default:; /* should not happen */
  ------------------
  |  Branch (2037:5): [True: 0, False: 12.0k]
  ------------------
 2038|  12.0k|    }
 2039|  12.0k|  }
 2040|       |
 2041|  12.0k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  12.0k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2042|  12.0k|                    parser->m_bufferPtr, &parser->m_position);
 2043|  12.0k|  parser->m_positionPtr = parser->m_bufferPtr;
 2044|  12.0k|  return result;
 2045|  20.0k|}
XML_GetBuffer:
 2048|  20.0k|XML_GetBuffer(XML_Parser parser, int len) {
 2049|  20.0k|  if (parser == NULL)
  ------------------
  |  Branch (2049:7): [True: 0, False: 20.0k]
  ------------------
 2050|      0|    return NULL;
 2051|  20.0k|  if (len < 0) {
  ------------------
  |  Branch (2051:7): [True: 0, False: 20.0k]
  ------------------
 2052|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2053|      0|    return NULL;
 2054|      0|  }
 2055|  20.0k|  switch (parser->m_parsingStatus.parsing) {
 2056|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2056:3): [True: 0, False: 20.0k]
  ------------------
 2057|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2058|      0|    return NULL;
 2059|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2059:3): [True: 0, False: 20.0k]
  ------------------
 2060|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2061|      0|    return NULL;
 2062|  20.0k|  default:;
  ------------------
  |  Branch (2062:3): [True: 20.0k, False: 0]
  ------------------
 2063|  20.0k|  }
 2064|       |
 2065|  20.0k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  199|  20.0k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 20.0k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2065:7): [True: 20.0k, False: 0]
  ------------------
 2066|  20.0k|#ifdef XML_CONTEXT_BYTES
 2067|  20.0k|    int keep;
 2068|  20.0k|#endif /* defined XML_CONTEXT_BYTES */
 2069|       |    /* Do not invoke signed arithmetic overflow: */
 2070|  20.0k|    int neededSize = (int)((unsigned)len
 2071|  20.0k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  199|  20.0k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 20.0k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2072|  20.0k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2073|  20.0k|    if (neededSize < 0) {
  ------------------
  |  Branch (2073:9): [True: 0, False: 20.0k]
  ------------------
 2074|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2075|      0|      return NULL;
 2076|      0|    }
 2077|  20.0k|#ifdef XML_CONTEXT_BYTES
 2078|  20.0k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  199|  20.0k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 20.0k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2079|  20.0k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   96|  20.0k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2079:9): [True: 0, False: 20.0k]
  ------------------
 2080|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   96|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2081|       |    /* Detect and prevent integer overflow */
 2082|  20.0k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2082:9): [True: 0, False: 20.0k]
  ------------------
 2083|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2084|      0|      return NULL;
 2085|      0|    }
 2086|  20.0k|    neededSize += keep;
 2087|  20.0k|#endif /* defined XML_CONTEXT_BYTES */
 2088|  20.0k|    if (neededSize
  ------------------
  |  Branch (2088:9): [True: 0, False: 20.0k]
  ------------------
 2089|  20.0k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  199|  20.0k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 20.0k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2090|      0|#ifdef XML_CONTEXT_BYTES
 2091|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2091:11): [True: 0, False: 0]
  ------------------
 2092|      0|        int offset
 2093|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2094|      0|              - keep;
 2095|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2096|       |         * in the buffer */
 2097|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2098|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2099|      0|        parser->m_bufferEnd -= offset;
 2100|      0|        parser->m_bufferPtr -= offset;
 2101|      0|      }
 2102|       |#else
 2103|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2104|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2105|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2106|       |        parser->m_bufferEnd
 2107|       |            = parser->m_buffer
 2108|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2109|       |        parser->m_bufferPtr = parser->m_buffer;
 2110|       |      }
 2111|       |#endif /* not defined XML_CONTEXT_BYTES */
 2112|  20.0k|    } else {
 2113|  20.0k|      char *newBuf;
 2114|  20.0k|      int bufferSize
 2115|  20.0k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  199|  20.0k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 20.0k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2116|  20.0k|      if (bufferSize == 0)
  ------------------
  |  Branch (2116:11): [True: 20.0k, False: 0]
  ------------------
 2117|  20.0k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  246|  20.0k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2118|  31.0k|      do {
 2119|       |        /* Do not invoke signed arithmetic overflow: */
 2120|  31.0k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2121|  31.0k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2121:16): [True: 10.9k, False: 20.0k]
  |  Branch (2121:43): [True: 10.9k, False: 0]
  ------------------
 2122|  20.0k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2122:11): [True: 0, False: 20.0k]
  ------------------
 2123|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2124|      0|        return NULL;
 2125|      0|      }
 2126|  20.0k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  713|  20.0k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2127|  20.0k|      if (newBuf == 0) {
  ------------------
  |  Branch (2127:11): [True: 0, False: 20.0k]
  ------------------
 2128|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2129|      0|        return NULL;
 2130|      0|      }
 2131|  20.0k|      parser->m_bufferLim = newBuf + bufferSize;
 2132|  20.0k|#ifdef XML_CONTEXT_BYTES
 2133|  20.0k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2133:11): [True: 0, False: 20.0k]
  ------------------
 2134|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2135|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2136|      0|                   + keep);
 2137|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2138|      0|        parser->m_buffer = newBuf;
 2139|      0|        parser->m_bufferEnd
 2140|      0|            = parser->m_buffer
 2141|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2142|      0|              + keep;
 2143|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2144|  20.0k|      } else {
 2145|       |        /* This must be a brand new buffer with no data in it yet */
 2146|  20.0k|        parser->m_bufferEnd = newBuf;
 2147|  20.0k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2148|  20.0k|      }
 2149|       |#else
 2150|       |      if (parser->m_bufferPtr) {
 2151|       |        memcpy(newBuf, parser->m_bufferPtr,
 2152|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2153|       |        FREE(parser, parser->m_buffer);
 2154|       |        parser->m_bufferEnd
 2155|       |            = newBuf
 2156|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2157|       |      } else {
 2158|       |        /* This must be a brand new buffer with no data in it yet */
 2159|       |        parser->m_bufferEnd = newBuf;
 2160|       |      }
 2161|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2162|       |#endif /* not defined XML_CONTEXT_BYTES */
 2163|  20.0k|    }
 2164|  20.0k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2165|  20.0k|    parser->m_positionPtr = NULL;
 2166|  20.0k|  }
 2167|  20.0k|  return parser->m_bufferEnd;
 2168|  20.0k|}
xmlparse.c:parserCreate:
  976|  20.0k|             DTD *dtd) {
  977|  20.0k|  XML_Parser parser;
  978|       |
  979|  20.0k|  if (memsuite) {
  ------------------
  |  Branch (979:7): [True: 0, False: 20.0k]
  ------------------
  980|      0|    XML_Memory_Handling_Suite *mtemp;
  981|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  982|      0|    if (parser != NULL) {
  ------------------
  |  Branch (982:9): [True: 0, False: 0]
  ------------------
  983|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  984|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  985|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  986|      0|      mtemp->free_fcn = memsuite->free_fcn;
  987|      0|    }
  988|  20.0k|  } else {
  989|  20.0k|    XML_Memory_Handling_Suite *mtemp;
  990|  20.0k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  991|  20.0k|    if (parser != NULL) {
  ------------------
  |  Branch (991:9): [True: 20.0k, False: 0]
  ------------------
  992|  20.0k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  993|  20.0k|      mtemp->malloc_fcn = malloc;
  994|  20.0k|      mtemp->realloc_fcn = realloc;
  995|  20.0k|      mtemp->free_fcn = free;
  996|  20.0k|    }
  997|  20.0k|  }
  998|       |
  999|  20.0k|  if (! parser)
  ------------------
  |  Branch (999:7): [True: 0, False: 20.0k]
  ------------------
 1000|      0|    return parser;
 1001|       |
 1002|  20.0k|  parser->m_buffer = NULL;
 1003|  20.0k|  parser->m_bufferLim = NULL;
 1004|       |
 1005|  20.0k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  243|  20.0k|#define INIT_ATTS_SIZE 16
  ------------------
 1006|  20.0k|  parser->m_atts
 1007|  20.0k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  713|  20.0k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1008|  20.0k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1008:7): [True: 0, False: 20.0k]
  ------------------
 1009|      0|    FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1010|      0|    return NULL;
 1011|      0|  }
 1012|       |#ifdef XML_ATTR_INFO
 1013|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1014|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1015|       |  if (parser->m_attInfo == NULL) {
 1016|       |    FREE(parser, parser->m_atts);
 1017|       |    FREE(parser, parser);
 1018|       |    return NULL;
 1019|       |  }
 1020|       |#endif
 1021|  20.0k|  parser->m_dataBuf
 1022|  20.0k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  713|  20.0k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1023|  20.0k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1023:7): [True: 0, False: 20.0k]
  ------------------
 1024|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1025|       |#ifdef XML_ATTR_INFO
 1026|       |    FREE(parser, parser->m_attInfo);
 1027|       |#endif
 1028|      0|    FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1029|      0|    return NULL;
 1030|      0|  }
 1031|  20.0k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  242|  20.0k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1032|       |
 1033|  20.0k|  if (dtd)
  ------------------
  |  Branch (1033:7): [True: 0, False: 20.0k]
  ------------------
 1034|      0|    parser->m_dtd = dtd;
 1035|  20.0k|  else {
 1036|  20.0k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1037|  20.0k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1037:9): [True: 0, False: 20.0k]
  ------------------
 1038|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1039|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|       |#ifdef XML_ATTR_INFO
 1041|       |      FREE(parser, parser->m_attInfo);
 1042|       |#endif
 1043|      0|      FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1044|      0|      return NULL;
 1045|      0|    }
 1046|  20.0k|  }
 1047|       |
 1048|  20.0k|  parser->m_freeBindingList = NULL;
 1049|  20.0k|  parser->m_freeTagList = NULL;
 1050|  20.0k|  parser->m_freeInternalEntities = NULL;
 1051|       |
 1052|  20.0k|  parser->m_groupSize = 0;
 1053|  20.0k|  parser->m_groupConnector = NULL;
 1054|       |
 1055|  20.0k|  parser->m_unknownEncodingHandler = NULL;
 1056|  20.0k|  parser->m_unknownEncodingHandlerData = NULL;
 1057|       |
 1058|  20.0k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  20.0k|#define ASCII_EXCL 0x21
  ------------------
 1059|  20.0k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1060|  20.0k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|       |
 1062|  20.0k|  parser->m_nsAtts = NULL;
 1063|  20.0k|  parser->m_nsAttsVersion = 0;
 1064|  20.0k|  parser->m_nsAttsPower = 0;
 1065|       |
 1066|  20.0k|  parser->m_protocolEncodingName = NULL;
 1067|       |
 1068|  20.0k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1069|  20.0k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1070|  20.0k|  parserInit(parser, encodingName);
 1071|       |
 1072|  20.0k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1072:7): [True: 20.0k, False: 0]
  |  Branch (1072:23): [True: 0, False: 20.0k]
  ------------------
 1073|      0|    if (dtd) {
  ------------------
  |  Branch (1073:9): [True: 0, False: 0]
  ------------------
 1074|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1075|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1076|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1077|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1078|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1079|      0|      parser->m_dtd = NULL;
 1080|      0|    }
 1081|      0|    XML_ParserFree(parser);
 1082|      0|    return NULL;
 1083|      0|  }
 1084|       |
 1085|  20.0k|  if (nameSep) {
  ------------------
  |  Branch (1085:7): [True: 0, False: 20.0k]
  ------------------
 1086|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1087|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  162|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1088|      0|    parser->m_namespaceSeparator = *nameSep;
 1089|  20.0k|  } else {
 1090|  20.0k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  161|  20.0k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1091|  20.0k|  }
 1092|       |
 1093|  20.0k|  return parser;
 1094|  20.0k|}
xmlparse.c:dtdCreate:
 6715|  20.0k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6716|  20.0k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6717|  20.0k|  if (p == NULL)
  ------------------
  |  Branch (6717:7): [True: 0, False: 20.0k]
  ------------------
 6718|      0|    return p;
 6719|  20.0k|  poolInit(&(p->pool), ms);
 6720|  20.0k|  poolInit(&(p->entityValuePool), ms);
 6721|  20.0k|  hashTableInit(&(p->generalEntities), ms);
 6722|  20.0k|  hashTableInit(&(p->elementTypes), ms);
 6723|  20.0k|  hashTableInit(&(p->attributeIds), ms);
 6724|  20.0k|  hashTableInit(&(p->prefixes), ms);
 6725|  20.0k|#ifdef XML_DTD
 6726|  20.0k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6727|  20.0k|  hashTableInit(&(p->paramEntities), ms);
 6728|  20.0k|#endif /* XML_DTD */
 6729|  20.0k|  p->defaultPrefix.name = NULL;
 6730|  20.0k|  p->defaultPrefix.binding = NULL;
 6731|       |
 6732|  20.0k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6733|  20.0k|  p->scaffIndex = NULL;
 6734|  20.0k|  p->scaffold = NULL;
 6735|  20.0k|  p->scaffLevel = 0;
 6736|  20.0k|  p->scaffSize = 0;
 6737|  20.0k|  p->scaffCount = 0;
 6738|  20.0k|  p->contentStringLen = 0;
 6739|       |
 6740|  20.0k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  20.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6741|  20.0k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6742|  20.0k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  20.0k|  return p;
 6744|  20.0k|}
xmlparse.c:hashTableInit:
 7149|   100k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7150|   100k|  p->power = 0;
 7151|   100k|  p->size = 0;
 7152|   100k|  p->used = 0;
 7153|   100k|  p->v = NULL;
 7154|   100k|  p->mem = ms;
 7155|   100k|}
xmlparse.c:poolInit:
 7174|  80.2k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7175|  80.2k|  pool->blocks = NULL;
 7176|  80.2k|  pool->freeBlocks = NULL;
 7177|  80.2k|  pool->start = NULL;
 7178|  80.2k|  pool->ptr = NULL;
 7179|  80.2k|  pool->end = NULL;
 7180|  80.2k|  pool->mem = ms;
 7181|  80.2k|}
xmlparse.c:parserInit:
 1097|  20.0k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1098|  20.0k|  parser->m_processor = prologInitProcessor;
 1099|  20.0k|  XmlPrologStateInit(&parser->m_prologState);
 1100|  20.0k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1100:7): [True: 20.0k, False: 0]
  ------------------
 1101|  20.0k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1102|  20.0k|  }
 1103|  20.0k|  parser->m_curBase = NULL;
 1104|  20.0k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1105|  20.0k|  parser->m_userData = NULL;
 1106|  20.0k|  parser->m_handlerArg = NULL;
 1107|  20.0k|  parser->m_startElementHandler = NULL;
 1108|  20.0k|  parser->m_endElementHandler = NULL;
 1109|  20.0k|  parser->m_characterDataHandler = NULL;
 1110|  20.0k|  parser->m_processingInstructionHandler = NULL;
 1111|  20.0k|  parser->m_commentHandler = NULL;
 1112|  20.0k|  parser->m_startCdataSectionHandler = NULL;
 1113|  20.0k|  parser->m_endCdataSectionHandler = NULL;
 1114|  20.0k|  parser->m_defaultHandler = NULL;
 1115|  20.0k|  parser->m_startDoctypeDeclHandler = NULL;
 1116|  20.0k|  parser->m_endDoctypeDeclHandler = NULL;
 1117|  20.0k|  parser->m_unparsedEntityDeclHandler = NULL;
 1118|  20.0k|  parser->m_notationDeclHandler = NULL;
 1119|  20.0k|  parser->m_startNamespaceDeclHandler = NULL;
 1120|  20.0k|  parser->m_endNamespaceDeclHandler = NULL;
 1121|  20.0k|  parser->m_notStandaloneHandler = NULL;
 1122|  20.0k|  parser->m_externalEntityRefHandler = NULL;
 1123|  20.0k|  parser->m_externalEntityRefHandlerArg = parser;
 1124|  20.0k|  parser->m_skippedEntityHandler = NULL;
 1125|  20.0k|  parser->m_elementDeclHandler = NULL;
 1126|  20.0k|  parser->m_attlistDeclHandler = NULL;
 1127|  20.0k|  parser->m_entityDeclHandler = NULL;
 1128|  20.0k|  parser->m_xmlDeclHandler = NULL;
 1129|  20.0k|  parser->m_bufferPtr = parser->m_buffer;
 1130|  20.0k|  parser->m_bufferEnd = parser->m_buffer;
 1131|  20.0k|  parser->m_parseEndByteIndex = 0;
 1132|  20.0k|  parser->m_parseEndPtr = NULL;
 1133|  20.0k|  parser->m_declElementType = NULL;
 1134|  20.0k|  parser->m_declAttributeId = NULL;
 1135|  20.0k|  parser->m_declEntity = NULL;
 1136|  20.0k|  parser->m_doctypeName = NULL;
 1137|  20.0k|  parser->m_doctypeSysid = NULL;
 1138|  20.0k|  parser->m_doctypePubid = NULL;
 1139|  20.0k|  parser->m_declAttributeType = NULL;
 1140|  20.0k|  parser->m_declNotationName = NULL;
 1141|  20.0k|  parser->m_declNotationPublicId = NULL;
 1142|  20.0k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1143|  20.0k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  20.0k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1145|  20.0k|  parser->m_errorCode = XML_ERROR_NONE;
 1146|  20.0k|  parser->m_eventPtr = NULL;
 1147|  20.0k|  parser->m_eventEndPtr = NULL;
 1148|  20.0k|  parser->m_positionPtr = NULL;
 1149|  20.0k|  parser->m_openInternalEntities = NULL;
 1150|  20.0k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  20.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1151|  20.0k|  parser->m_tagLevel = 0;
 1152|  20.0k|  parser->m_tagStack = NULL;
 1153|  20.0k|  parser->m_inheritedBindings = NULL;
 1154|  20.0k|  parser->m_nSpecifiedAtts = 0;
 1155|  20.0k|  parser->m_unknownEncodingMem = NULL;
 1156|  20.0k|  parser->m_unknownEncodingRelease = NULL;
 1157|  20.0k|  parser->m_unknownEncodingData = NULL;
 1158|  20.0k|  parser->m_parentParser = NULL;
 1159|  20.0k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1160|  20.0k|#ifdef XML_DTD
 1161|  20.0k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1162|  20.0k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  20.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  20.0k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1164|  20.0k|#endif
 1165|  20.0k|  parser->m_hash_secret_salt = 0;
 1166|       |
 1167|  20.0k|#ifdef XML_DTD
 1168|  20.0k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1169|  20.0k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1170|  20.0k|  parser->m_accounting.maximumAmplificationFactor
 1171|  20.0k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  20.0k|  100.0f
  ------------------
 1172|  20.0k|  parser->m_accounting.activationThresholdBytes
 1173|  20.0k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  20.0k|  8388608 // 8 MiB, 2^23
  ------------------
 1174|       |
 1175|  20.0k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1176|  20.0k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1177|  20.0k|#endif
 1178|  20.0k|}
xmlparse.c:prologInitProcessor:
 4405|  20.0k|                    const char **nextPtr) {
 4406|  20.0k|  enum XML_Error result = initializeEncoding(parser);
 4407|  20.0k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4407:7): [True: 0, False: 20.0k]
  ------------------
 4408|      0|    return result;
 4409|  20.0k|  parser->m_processor = prologProcessor;
 4410|  20.0k|  return prologProcessor(parser, s, end, nextPtr);
 4411|  20.0k|}
xmlparse.c:initializeEncoding:
 4248|  20.0k|initializeEncoding(XML_Parser parser) {
 4249|  20.0k|  const char *s;
 4250|       |#ifdef XML_UNICODE
 4251|       |  char encodingBuf[128];
 4252|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4253|       |  if (! parser->m_protocolEncodingName)
 4254|       |    s = NULL;
 4255|       |  else {
 4256|       |    int i;
 4257|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4258|       |      if (i == sizeof(encodingBuf) - 1
 4259|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4260|       |        encodingBuf[0] = '\0';
 4261|       |        break;
 4262|       |      }
 4263|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4264|       |    }
 4265|       |    encodingBuf[i] = '\0';
 4266|       |    s = encodingBuf;
 4267|       |  }
 4268|       |#else
 4269|  20.0k|  s = parser->m_protocolEncodingName;
 4270|  20.0k|#endif
 4271|  20.0k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4271:7): [True: 20.0k, False: 0]
  |  Branch (4271:8): [True: 0, False: 20.0k]
  ------------------
 4272|  20.0k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4273|  20.0k|    return XML_ERROR_NONE;
 4274|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4275|  20.0k|}
xmlparse.c:prologProcessor:
 4605|  20.0k|                const char **nextPtr) {
 4606|  20.0k|  const char *next = s;
 4607|  20.0k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  20.0k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  20.0k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4608|  20.0k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4609|  20.0k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  20.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4610|  20.0k|                  XML_ACCOUNT_DIRECT);
 4611|  20.0k|}
xmlparse.c:doProlog:
 4616|  20.0k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4617|  20.0k|#ifdef XML_DTD
 4618|  20.0k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  20.0k|#define ASCII_HASH 0x23
  ------------------
 4619|  20.0k|#endif /* XML_DTD */
 4620|  20.0k|  static const XML_Char atypeCDATA[]
 4621|  20.0k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  20.0k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  20.0k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  20.0k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  20.0k|#define ASCII_A 0x41
  ------------------
 4622|  20.0k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  20.0k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  20.0k|#define ASCII_D 0x44
  ------------------
 4623|  20.0k|  static const XML_Char atypeIDREF[]
 4624|  20.0k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  20.0k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  20.0k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  20.0k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  20.0k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  20.0k|#define ASCII_F 0x46
  ------------------
 4625|  20.0k|  static const XML_Char atypeIDREFS[]
 4626|  20.0k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  20.0k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  20.0k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  20.0k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  20.0k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  20.0k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  20.0k|#define ASCII_S 0x53
  ------------------
 4627|  20.0k|  static const XML_Char atypeENTITY[]
 4628|  20.0k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  20.0k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  20.0k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  20.0k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  20.0k|#define ASCII_Y 0x59
  ------------------
 4629|  20.0k|  static const XML_Char atypeENTITIES[]
 4630|  20.0k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  20.0k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  20.0k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  20.0k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
 4631|  20.0k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  20.0k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  20.0k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  20.0k|#define ASCII_S 0x53
  ------------------
 4632|  20.0k|  static const XML_Char atypeNMTOKEN[]
 4633|  20.0k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  20.0k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  20.0k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  20.0k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  20.0k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  20.0k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  20.0k|#define ASCII_N 0x4E
  ------------------
 4634|  20.0k|  static const XML_Char atypeNMTOKENS[]
 4635|  20.0k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  20.0k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  20.0k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  20.0k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  20.0k|#define ASCII_K 0x4B
  ------------------
 4636|  20.0k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  20.0k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  20.0k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  20.0k|#define ASCII_S 0x53
  ------------------
 4637|  20.0k|  static const XML_Char notationPrefix[]
 4638|  20.0k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  20.0k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  20.0k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  20.0k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  20.0k|#define ASCII_T 0x54
  ------------------
 4639|  20.0k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  20.0k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  20.0k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  20.0k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  20.0k|#define ASCII_LPAREN 0x28
  ------------------
 4640|  20.0k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  20.0k|#define ASCII_PIPE 0x7C
  ------------------
 4641|  20.0k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  20.0k|#define ASCII_LPAREN 0x28
  ------------------
 4642|       |
 4643|       |#ifndef XML_DTD
 4644|       |  UNUSED_P(account);
 4645|       |#endif
 4646|       |
 4647|       |  /* save one level of indirection */
 4648|  20.0k|  DTD *const dtd = parser->m_dtd;
 4649|       |
 4650|  20.0k|  const char **eventPP;
 4651|  20.0k|  const char **eventEndPP;
 4652|  20.0k|  enum XML_Content_Quant quant;
 4653|       |
 4654|  20.0k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4654:7): [True: 20.0k, False: 0]
  ------------------
 4655|  20.0k|    eventPP = &parser->m_eventPtr;
 4656|  20.0k|    eventEndPP = &parser->m_eventEndPtr;
 4657|  20.0k|  } else {
 4658|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4659|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4660|      0|  }
 4661|       |
 4662|  6.17M|  for (;;) {
 4663|  6.17M|    int role;
 4664|  6.17M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  6.17M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4665|  6.17M|    *eventPP = s;
 4666|  6.17M|    *eventEndPP = next;
 4667|  6.17M|    if (tok <= 0) {
  ------------------
  |  Branch (4667:9): [True: 6.74k, False: 6.16M]
  ------------------
 4668|  6.74k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.74k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4668:11): [True: 6.74k, False: 0]
  |  Branch (4668:23): [True: 4.83k, False: 1.91k]
  ------------------
 4669|  4.83k|        *nextPtr = s;
 4670|  4.83k|        return XML_ERROR_NONE;
 4671|  4.83k|      }
 4672|  1.91k|      switch (tok) {
 4673|  1.91k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  1.91k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4673:7): [True: 1.91k, False: 0]
  ------------------
 4674|  1.91k|        *eventPP = next;
 4675|  1.91k|        return XML_ERROR_INVALID_TOKEN;
 4676|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4676:7): [True: 0, False: 1.91k]
  ------------------
 4677|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4678|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4678:7): [True: 0, False: 1.91k]
  ------------------
 4679|      0|        return XML_ERROR_PARTIAL_CHAR;
 4680|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4680:7): [True: 0, False: 1.91k]
  ------------------
 4681|      0|        tok = -tok;
 4682|      0|        break;
 4683|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4683:7): [True: 0, False: 1.91k]
  ------------------
 4684|      0|#ifdef XML_DTD
 4685|       |        /* for internal PE NOT referenced between declarations */
 4686|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4686:13): [True: 0, False: 0]
  ------------------
 4687|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4687:16): [True: 0, False: 0]
  ------------------
 4688|      0|          *nextPtr = s;
 4689|      0|          return XML_ERROR_NONE;
 4690|      0|        }
 4691|       |        /* WFC: PE Between Declarations - must check that PE contains
 4692|       |           complete markup, not only for external PEs, but also for
 4693|       |           internal PEs if the reference occurs between declarations.
 4694|       |        */
 4695|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4695:13): [True: 0, False: 0]
  |  Branch (4695:40): [True: 0, False: 0]
  ------------------
 4696|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4696:15): [True: 0, False: 0]
  ------------------
 4697|      0|              == XML_ROLE_ERROR)
 4698|      0|            return XML_ERROR_INCOMPLETE_PE;
 4699|      0|          *nextPtr = s;
 4700|      0|          return XML_ERROR_NONE;
 4701|      0|        }
 4702|      0|#endif /* XML_DTD */
 4703|      0|        return XML_ERROR_NO_ELEMENTS;
 4704|      0|      default:
  ------------------
  |  Branch (4704:7): [True: 0, False: 1.91k]
  ------------------
 4705|      0|        tok = -tok;
 4706|      0|        next = end;
 4707|      0|        break;
 4708|  1.91k|      }
 4709|  1.91k|    }
 4710|  6.16M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  6.16M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4711|  6.16M|#ifdef XML_DTD
 4712|  6.16M|    switch (role) {
 4713|  11.5k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4713:5): [True: 11.5k, False: 6.15M]
  ------------------
 4714|  11.8k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4714:5): [True: 315, False: 6.16M]
  ------------------
 4715|  11.8k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 0, False: 6.16M]
  ------------------
 4716|  11.8k|      break;
 4717|  6.15M|    default:
  ------------------
  |  Branch (4717:5): [True: 6.15M, False: 11.8k]
  ------------------
 4718|  6.15M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4718:11): [True: 0, False: 6.15M]
  ------------------
 4719|      0|        accountingOnAbort(parser);
 4720|      0|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4721|      0|      }
 4722|  6.16M|    }
 4723|  6.16M|#endif
 4724|  6.16M|    switch (role) {
  ------------------
  |  Branch (4724:13): [True: 0, False: 6.16M]
  ------------------
 4725|    315|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4725:5): [True: 315, False: 6.16M]
  ------------------
 4726|    315|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4727|    315|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4727:11): [True: 237, False: 78]
  ------------------
 4728|    237|        return result;
 4729|     78|      enc = parser->m_encoding;
 4730|     78|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     78|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4731|     78|    } break;
 4732|  6.09k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4732:5): [True: 6.09k, False: 6.16M]
  ------------------
 4733|  6.09k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4733:11): [True: 0, False: 6.09k]
  ------------------
 4734|      0|        parser->m_doctypeName
 4735|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4736|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4736:13): [True: 0, False: 0]
  ------------------
 4737|      0|          return XML_ERROR_NO_MEMORY;
 4738|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4739|      0|        parser->m_doctypePubid = NULL;
 4740|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4741|      0|      }
 4742|  6.09k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4743|  6.09k|      break;
 4744|  5.28k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4744:5): [True: 5.28k, False: 6.16M]
  ------------------
 4745|  5.28k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4745:11): [True: 0, False: 5.28k]
  ------------------
 4746|      0|        parser->m_startDoctypeDeclHandler(
 4747|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4748|      0|            parser->m_doctypePubid, 1);
 4749|      0|        parser->m_doctypeName = NULL;
 4750|      0|        poolClear(&parser->m_tempPool);
 4751|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4752|      0|      }
 4753|  5.28k|      break;
 4754|      0|#ifdef XML_DTD
 4755|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4755:5): [True: 0, False: 6.16M]
  ------------------
 4756|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4757|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4757:11): [True: 0, False: 0]
  ------------------
 4758|      0|        return result;
 4759|      0|      enc = parser->m_encoding;
 4760|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4761|      0|    } break;
 4762|      0|#endif /* XML_DTD */
 4763|    716|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4763:5): [True: 716, False: 6.16M]
  ------------------
 4764|    716|#ifdef XML_DTD
 4765|    716|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    716|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4766|    716|      parser->m_declEntity = (ENTITY *)lookup(
 4767|    716|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4768|    716|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4768:11): [True: 0, False: 716]
  ------------------
 4769|      0|        return XML_ERROR_NO_MEMORY;
 4770|    716|#endif /* XML_DTD */
 4771|    716|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    716|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4772|    716|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4772:11): [True: 0, False: 716]
  ------------------
 4773|      0|        XML_Char *pubId;
 4774|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4774:13): [True: 0, False: 0]
  ------------------
 4775|      0|          return XML_ERROR_PUBLICID;
 4776|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4777|      0|                                s + enc->minBytesPerChar,
 4778|      0|                                next - enc->minBytesPerChar);
 4779|      0|        if (! pubId)
  ------------------
  |  Branch (4779:13): [True: 0, False: 0]
  ------------------
 4780|      0|          return XML_ERROR_NO_MEMORY;
 4781|      0|        normalizePublicId(pubId);
 4782|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4783|      0|        parser->m_doctypePubid = pubId;
 4784|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4785|      0|        goto alreadyChecked;
 4786|      0|      }
 4787|       |      /* fall through */
 4788|  2.86k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4788:5): [True: 2.14k, False: 6.16M]
  ------------------
 4789|  2.86k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  2.86k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4789:11): [True: 82, False: 2.77k]
  ------------------
 4790|     82|        return XML_ERROR_PUBLICID;
 4791|  2.77k|    alreadyChecked:
 4792|  2.77k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4792:11): [True: 2.16k, False: 614]
  |  Branch (4792:34): [True: 815, False: 1.35k]
  ------------------
 4793|    815|        XML_Char *tem
 4794|    815|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4795|    815|                              next - enc->minBytesPerChar);
 4796|    815|        if (! tem)
  ------------------
  |  Branch (4796:13): [True: 0, False: 815]
  ------------------
 4797|      0|          return XML_ERROR_NO_MEMORY;
 4798|    815|        normalizePublicId(tem);
 4799|    815|        parser->m_declEntity->publicId = tem;
 4800|    815|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    815|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4801|       |        /* Don't suppress the default handler if we fell through from
 4802|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4803|       |         */
 4804|    815|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4804:13): [True: 0, False: 815]
  |  Branch (4804:44): [True: 0, False: 0]
  ------------------
 4805|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4806|    815|      }
 4807|  2.77k|      break;
 4808|  2.77k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4808:5): [True: 2.27k, False: 6.16M]
  ------------------
 4809|  2.27k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.27k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4809:11): [True: 0, False: 2.27k]
  ------------------
 4810|       |        /* Must not close doctype from within expanded parameter entities */
 4811|      0|        return XML_ERROR_INVALID_TOKEN;
 4812|      0|      }
 4813|       |
 4814|  2.27k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4814:11): [True: 0, False: 2.27k]
  ------------------
 4815|      0|        parser->m_startDoctypeDeclHandler(
 4816|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4817|      0|            parser->m_doctypePubid, 0);
 4818|      0|        poolClear(&parser->m_tempPool);
 4819|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4820|      0|      }
 4821|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4822|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4823|       |         was not set, indicating an external subset
 4824|       |      */
 4825|  2.27k|#ifdef XML_DTD
 4826|  2.27k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4826:11): [True: 2, False: 2.27k]
  |  Branch (4826:37): [True: 0, False: 2.27k]
  ------------------
 4827|      2|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4828|      2|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      2|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4829|      2|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4829:13): [True: 0, False: 2]
  ------------------
 4830|      2|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4830:16): [True: 0, False: 0]
  ------------------
 4831|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4832|      0|                                            externalSubsetName, sizeof(ENTITY));
 4833|      0|          if (! entity) {
  ------------------
  |  Branch (4833:15): [True: 0, False: 0]
  ------------------
 4834|       |            /* The external subset name "#" will have already been
 4835|       |             * inserted into the hash table at the start of the
 4836|       |             * external entity parsing, so no allocation will happen
 4837|       |             * and lookup() cannot fail.
 4838|       |             */
 4839|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4840|      0|          }
 4841|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4841:15): [True: 0, False: 0]
  ------------------
 4842|      0|            entity->base = parser->m_curBase;
 4843|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4844|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4844:15): [True: 0, False: 0]
  ------------------
 4845|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4846|      0|                  entity->systemId, entity->publicId))
 4847|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4848|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4848:15): [True: 0, False: 0]
  ------------------
 4849|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4849:17): [True: 0, False: 0]
  |  Branch (4849:38): [True: 0, False: 0]
  ------------------
 4850|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4850:20): [True: 0, False: 0]
  ------------------
 4851|      0|              return XML_ERROR_NOT_STANDALONE;
 4852|      0|          }
 4853|       |          /* if we didn't read the foreign DTD then this means that there
 4854|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4855|       |          */
 4856|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4856:20): [True: 0, False: 0]
  ------------------
 4857|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4858|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4859|      0|        }
 4860|      2|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|      2|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4861|      2|      }
 4862|  2.27k|#endif /* XML_DTD */
 4863|  2.27k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4863:11): [True: 0, False: 2.27k]
  ------------------
 4864|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4865|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4866|      0|      }
 4867|  2.27k|      break;
 4868|  11.5k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4868:5): [True: 11.5k, False: 6.15M]
  ------------------
 4869|  11.5k|#ifdef XML_DTD
 4870|       |      /* if there is no DOCTYPE declaration then now is the
 4871|       |         last chance to read the foreign DTD
 4872|       |      */
 4873|  11.5k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4873:11): [True: 0, False: 11.5k]
  ------------------
 4874|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4875|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4876|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4876:13): [True: 0, False: 0]
  ------------------
 4877|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4877:16): [True: 0, False: 0]
  ------------------
 4878|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4879|      0|                                            externalSubsetName, sizeof(ENTITY));
 4880|      0|          if (! entity)
  ------------------
  |  Branch (4880:15): [True: 0, False: 0]
  ------------------
 4881|      0|            return XML_ERROR_NO_MEMORY;
 4882|      0|          entity->base = parser->m_curBase;
 4883|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4884|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4884:15): [True: 0, False: 0]
  ------------------
 4885|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4886|      0|                  entity->systemId, entity->publicId))
 4887|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4888|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4888:15): [True: 0, False: 0]
  ------------------
 4889|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4889:17): [True: 0, False: 0]
  |  Branch (4889:38): [True: 0, False: 0]
  ------------------
 4890|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4890:20): [True: 0, False: 0]
  ------------------
 4891|      0|              return XML_ERROR_NOT_STANDALONE;
 4892|      0|          }
 4893|       |          /* if we didn't read the foreign DTD then this means that there
 4894|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4895|       |          */
 4896|      0|          else
 4897|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4898|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4899|      0|        }
 4900|      0|      }
 4901|  11.5k|#endif /* XML_DTD */
 4902|  11.5k|      parser->m_processor = contentProcessor;
 4903|  11.5k|      return contentProcessor(parser, s, end, nextPtr);
 4904|  10.8k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4904:5): [True: 10.8k, False: 6.15M]
  ------------------
 4905|  10.8k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4906|  10.8k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4906:11): [True: 0, False: 10.8k]
  ------------------
 4907|      0|        return XML_ERROR_NO_MEMORY;
 4908|  10.8k|      goto checkAttListDeclHandler;
 4909|  43.1k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4909:5): [True: 43.1k, False: 6.12M]
  ------------------
 4910|  43.1k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4911|  43.1k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4911:11): [True: 0, False: 43.1k]
  ------------------
 4912|      0|        return XML_ERROR_NO_MEMORY;
 4913|  43.1k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  43.1k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4914|  43.1k|      parser->m_declAttributeType = NULL;
 4915|  43.1k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  43.1k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4916|  43.1k|      goto checkAttListDeclHandler;
 4917|    306|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4917:5): [True: 306, False: 6.16M]
  ------------------
 4918|    306|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    306|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4919|    306|      parser->m_declAttributeType = atypeCDATA;
 4920|    306|      goto checkAttListDeclHandler;
 4921|  6.59k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4921:5): [True: 6.59k, False: 6.16M]
  ------------------
 4922|  6.59k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  6.59k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4923|  6.59k|      parser->m_declAttributeType = atypeID;
 4924|  6.59k|      goto checkAttListDeclHandler;
 4925|  12.1k|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4925:5): [True: 12.1k, False: 6.15M]
  ------------------
 4926|  12.1k|      parser->m_declAttributeType = atypeIDREF;
 4927|  12.1k|      goto checkAttListDeclHandler;
 4928|  6.24k|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4928:5): [True: 6.24k, False: 6.16M]
  ------------------
 4929|  6.24k|      parser->m_declAttributeType = atypeIDREFS;
 4930|  6.24k|      goto checkAttListDeclHandler;
 4931|  2.35k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4931:5): [True: 2.35k, False: 6.16M]
  ------------------
 4932|  2.35k|      parser->m_declAttributeType = atypeENTITY;
 4933|  2.35k|      goto checkAttListDeclHandler;
 4934|  7.51k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4934:5): [True: 7.51k, False: 6.16M]
  ------------------
 4935|  7.51k|      parser->m_declAttributeType = atypeENTITIES;
 4936|  7.51k|      goto checkAttListDeclHandler;
 4937|    335|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4937:5): [True: 335, False: 6.16M]
  ------------------
 4938|    335|      parser->m_declAttributeType = atypeNMTOKEN;
 4939|    335|      goto checkAttListDeclHandler;
 4940|    213|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4940:5): [True: 213, False: 6.16M]
  ------------------
 4941|    213|      parser->m_declAttributeType = atypeNMTOKENS;
 4942|  89.6k|    checkAttListDeclHandler:
 4943|  89.6k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4943:11): [True: 88.8k, False: 840]
  |  Branch (4943:34): [True: 0, False: 88.8k]
  ------------------
 4944|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4945|  89.6k|      break;
 4946|  11.2k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4946:5): [True: 11.2k, False: 6.15M]
  ------------------
 4947|  12.2k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4947:5): [True: 1.03k, False: 6.16M]
  ------------------
 4948|  12.2k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4948:11): [True: 11.7k, False: 527]
  |  Branch (4948:34): [True: 0, False: 11.7k]
  ------------------
 4949|      0|        const XML_Char *prefix;
 4950|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4950:13): [True: 0, False: 0]
  ------------------
 4951|      0|          prefix = enumValueSep;
 4952|      0|        } else {
 4953|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4953:21): [True: 0, False: 0]
  ------------------
 4954|      0|                                                              : enumValueStart);
 4955|      0|        }
 4956|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4956:13): [True: 0, False: 0]
  ------------------
 4957|      0|          return XML_ERROR_NO_MEMORY;
 4958|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4958:13): [True: 0, False: 0]
  ------------------
 4959|      0|          return XML_ERROR_NO_MEMORY;
 4960|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4961|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4962|      0|      }
 4963|  12.2k|      break;
 4964|  17.0k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4964:5): [True: 17.0k, False: 6.15M]
  ------------------
 4965|  18.0k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 955, False: 6.16M]
  ------------------
 4966|  18.0k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4966:11): [True: 17.8k, False: 194]
  ------------------
 4967|  17.8k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4967:13): [True: 0, False: 17.8k]
  ------------------
 4968|  17.8k|                              parser->m_declAttributeId,
 4969|  17.8k|                              parser->m_declAttributeIsCdata,
 4970|  17.8k|                              parser->m_declAttributeIsId, 0, parser))
 4971|      0|          return XML_ERROR_NO_MEMORY;
 4972|  17.8k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4972:13): [True: 0, False: 17.8k]
  |  Branch (4972:45): [True: 0, False: 0]
  ------------------
 4973|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4973:15): [True: 0, False: 0]
  ------------------
 4974|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:19): [True: 0, False: 0]
  ------------------
 4975|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:22): [True: 0, False: 0]
  ------------------
 4976|       |            /* Enumerated or Notation type */
 4977|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4977:17): [True: 0, False: 0]
  ------------------
 4978|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:20): [True: 0, False: 0]
  ------------------
 4979|      0|              return XML_ERROR_NO_MEMORY;
 4980|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4981|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4982|      0|          }
 4983|      0|          *eventEndPP = s;
 4984|      0|          parser->m_attlistDeclHandler(
 4985|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4986|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4987|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4988|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4989|      0|        }
 4990|  17.8k|      }
 4991|  18.0k|      poolClear(&parser->m_tempPool);
 4992|  18.0k|      break;
 4993|  23.0k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4993:5): [True: 23.0k, False: 6.14M]
  ------------------
 4994|  24.5k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 1.47k, False: 6.16M]
  ------------------
 4995|  24.5k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4995:11): [True: 24.2k, False: 293]
  ------------------
 4996|  24.2k|        const XML_Char *attVal;
 4997|  24.2k|        enum XML_Error result = storeAttributeValue(
 4998|  24.2k|            parser, enc, parser->m_declAttributeIsCdata,
 4999|  24.2k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5000|  24.2k|            XML_ACCOUNT_NONE);
 5001|  24.2k|        if (result)
  ------------------
  |  Branch (5001:13): [True: 13, False: 24.2k]
  ------------------
 5002|     13|          return result;
 5003|  24.2k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  595|  24.2k|#define poolStart(pool) ((pool)->start)
  ------------------
 5004|  24.2k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  24.2k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5005|       |        /* ID attributes aren't allowed to have a default */
 5006|  24.2k|        if (! defineAttribute(
  ------------------
  |  Branch (5006:13): [True: 0, False: 24.2k]
  ------------------
 5007|  24.2k|                parser->m_declElementType, parser->m_declAttributeId,
 5008|  24.2k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  24.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5009|      0|          return XML_ERROR_NO_MEMORY;
 5010|  24.2k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5010:13): [True: 0, False: 24.2k]
  |  Branch (5010:45): [True: 0, False: 0]
  ------------------
 5011|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5011:15): [True: 0, False: 0]
  ------------------
 5012|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:19): [True: 0, False: 0]
  ------------------
 5013|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:22): [True: 0, False: 0]
  ------------------
 5014|       |            /* Enumerated or Notation type */
 5015|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5015:17): [True: 0, False: 0]
  ------------------
 5016|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:20): [True: 0, False: 0]
  ------------------
 5017|      0|              return XML_ERROR_NO_MEMORY;
 5018|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5019|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5020|      0|          }
 5021|      0|          *eventEndPP = s;
 5022|      0|          parser->m_attlistDeclHandler(
 5023|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5024|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5025|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5026|      0|          poolClear(&parser->m_tempPool);
 5027|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5028|      0|        }
 5029|  24.2k|      }
 5030|  24.5k|      break;
 5031|  24.5k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5031:5): [True: 8.62k, False: 6.16M]
  ------------------
 5032|  8.62k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5032:11): [True: 7.91k, False: 710]
  ------------------
 5033|  7.91k|        enum XML_Error result
 5034|  7.91k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5035|  7.91k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5036|  7.91k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5036:13): [True: 3.67k, False: 4.24k]
  ------------------
 5037|  3.67k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  595|  3.67k|#define poolStart(pool) ((pool)->start)
  ------------------
 5038|  3.67k|          parser->m_declEntity->textLen
 5039|  3.67k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  596|  3.67k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5040|  3.67k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  600|  3.67k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5041|  3.67k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5041:15): [True: 0, False: 3.67k]
  ------------------
 5042|      0|            *eventEndPP = s;
 5043|      0|            parser->m_entityDeclHandler(
 5044|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5045|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5046|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5047|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5048|      0|          }
 5049|  3.67k|        } else
 5050|  4.24k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  599|  4.24k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5051|  7.91k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5051:13): [True: 78, False: 7.83k]
  ------------------
 5052|     78|          return result;
 5053|  7.91k|      }
 5054|  8.54k|      break;
 5055|  8.54k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5055:5): [True: 37, False: 6.16M]
  ------------------
 5056|     37|#ifdef XML_DTD
 5057|     37|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     37|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5058|     37|#endif /* XML_DTD */
 5059|     37|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     37|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5060|     37|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5060:11): [True: 0, False: 37]
  ------------------
 5061|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5062|      0|                                                 s + enc->minBytesPerChar,
 5063|      0|                                                 next - enc->minBytesPerChar);
 5064|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5064:13): [True: 0, False: 0]
  ------------------
 5065|      0|          return XML_ERROR_NO_MEMORY;
 5066|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5067|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5068|      0|      }
 5069|     37|#ifdef XML_DTD
 5070|     37|      else
 5071|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5072|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5073|     37|        parser->m_doctypeSysid = externalSubsetName;
 5074|     37|#endif /* XML_DTD */
 5075|     37|      if (! dtd->standalone
  ------------------
  |  Branch (5075:11): [True: 36, False: 1]
  ------------------
 5076|     37|#ifdef XML_DTD
 5077|     37|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5077:14): [True: 36, False: 0]
  ------------------
 5078|     37|#endif /* XML_DTD */
 5079|     37|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5079:14): [True: 0, False: 36]
  ------------------
 5080|     37|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5080:14): [True: 0, False: 0]
  ------------------
 5081|      0|        return XML_ERROR_NOT_STANDALONE;
 5082|       |#ifndef XML_DTD
 5083|       |      break;
 5084|       |#else  /* XML_DTD */
 5085|     37|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5085:11): [True: 7, False: 30]
  ------------------
 5086|      7|        parser->m_declEntity = (ENTITY *)lookup(
 5087|      7|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5088|      7|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5088:13): [True: 0, False: 7]
  ------------------
 5089|      0|          return XML_ERROR_NO_MEMORY;
 5090|      7|        parser->m_declEntity->publicId = NULL;
 5091|      7|      }
 5092|     37|#endif /* XML_DTD */
 5093|       |      /* fall through */
 5094|  3.27k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5094:5): [True: 3.24k, False: 6.16M]
  ------------------
 5095|  3.27k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5095:11): [True: 2.58k, False: 697]
  |  Branch (5095:34): [True: 304, False: 2.27k]
  ------------------
 5096|    304|        parser->m_declEntity->systemId
 5097|    304|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5098|    304|                              next - enc->minBytesPerChar);
 5099|    304|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5099:13): [True: 0, False: 304]
  ------------------
 5100|      0|          return XML_ERROR_NO_MEMORY;
 5101|    304|        parser->m_declEntity->base = parser->m_curBase;
 5102|    304|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    304|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5103|       |        /* Don't suppress the default handler if we fell through from
 5104|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5105|       |         */
 5106|    304|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5106:13): [True: 0, False: 304]
  |  Branch (5106:44): [True: 0, False: 0]
  ------------------
 5107|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5108|    304|      }
 5109|  3.27k|      break;
 5110|  3.27k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5110:5): [True: 2.85k, False: 6.16M]
  ------------------
 5111|  2.85k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5111:11): [True: 2.23k, False: 620]
  |  Branch (5111:34): [True: 223, False: 2.01k]
  ------------------
 5112|  2.85k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5112:14): [True: 0, False: 223]
  ------------------
 5113|      0|        *eventEndPP = s;
 5114|      0|        parser->m_entityDeclHandler(
 5115|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5116|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5117|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5118|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5119|      0|      }
 5120|  2.85k|      break;
 5121|    361|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5121:5): [True: 361, False: 6.16M]
  ------------------
 5122|    361|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5122:11): [True: 285, False: 76]
  |  Branch (5122:34): [True: 31, False: 254]
  ------------------
 5123|     31|        parser->m_declEntity->notation
 5124|     31|            = poolStoreString(&dtd->pool, enc, s, next);
 5125|     31|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5125:13): [True: 0, False: 31]
  ------------------
 5126|      0|          return XML_ERROR_NO_MEMORY;
 5127|     31|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|     31|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5128|     31|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5128:13): [True: 0, False: 31]
  ------------------
 5129|      0|          *eventEndPP = s;
 5130|      0|          parser->m_unparsedEntityDeclHandler(
 5131|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5132|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5133|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5134|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5135|     31|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5135:20): [True: 0, False: 31]
  ------------------
 5136|      0|          *eventEndPP = s;
 5137|      0|          parser->m_entityDeclHandler(
 5138|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5139|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5140|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5141|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5142|      0|        }
 5143|     31|      }
 5144|    361|      break;
 5145|  7.78k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5145:5): [True: 7.78k, False: 6.16M]
  ------------------
 5146|  7.78k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  7.78k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 84, False: 7.70k]
  |  |  ------------------
  ------------------
 5147|     84|        parser->m_declEntity = NULL;
 5148|     84|        break;
 5149|     84|      }
 5150|  7.70k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5150:11): [True: 6.89k, False: 806]
  ------------------
 5151|  6.89k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5152|  6.89k|        if (! name)
  ------------------
  |  Branch (5152:13): [True: 0, False: 6.89k]
  ------------------
 5153|      0|          return XML_ERROR_NO_MEMORY;
 5154|  6.89k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5155|  6.89k|                                                name, sizeof(ENTITY));
 5156|  6.89k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5156:13): [True: 0, False: 6.89k]
  ------------------
 5157|      0|          return XML_ERROR_NO_MEMORY;
 5158|  6.89k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5158:13): [True: 3.39k, False: 3.50k]
  ------------------
 5159|  3.39k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  3.39k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5160|  3.39k|          parser->m_declEntity = NULL;
 5161|  3.50k|        } else {
 5162|  3.50k|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|  3.50k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5163|  3.50k|          parser->m_declEntity->publicId = NULL;
 5164|  3.50k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  3.50k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5165|       |          /* if we have a parent parser or are reading an internal parameter
 5166|       |             entity, then the entity declaration is not considered "internal"
 5167|       |          */
 5168|  3.50k|          parser->m_declEntity->is_internal
 5169|  3.50k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5169:20): [True: 0, False: 3.50k]
  |  Branch (5169:46): [True: 0, False: 3.50k]
  ------------------
 5170|  3.50k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5170:15): [True: 0, False: 3.50k]
  ------------------
 5171|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5172|  3.50k|        }
 5173|  6.89k|      } else {
 5174|    806|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    806|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5175|    806|        parser->m_declEntity = NULL;
 5176|    806|      }
 5177|  7.70k|    } break;
 5178|  7.70k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5178:5): [True: 4.24k, False: 6.16M]
  ------------------
 5179|  4.24k|#ifdef XML_DTD
 5180|  4.24k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5180:11): [True: 3.63k, False: 618]
  ------------------
 5181|  3.63k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5182|  3.63k|        if (! name)
  ------------------
  |  Branch (5182:13): [True: 0, False: 3.63k]
  ------------------
 5183|      0|          return XML_ERROR_NO_MEMORY;
 5184|  3.63k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5185|  3.63k|                                                name, sizeof(ENTITY));
 5186|  3.63k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5186:13): [True: 0, False: 3.63k]
  ------------------
 5187|      0|          return XML_ERROR_NO_MEMORY;
 5188|  3.63k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5188:13): [True: 3.10k, False: 528]
  ------------------
 5189|  3.10k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  3.10k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5190|  3.10k|          parser->m_declEntity = NULL;
 5191|  3.10k|        } else {
 5192|    528|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|    528|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5193|    528|          parser->m_declEntity->publicId = NULL;
 5194|    528|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    528|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5195|       |          /* if we have a parent parser or are reading an internal parameter
 5196|       |             entity, then the entity declaration is not considered "internal"
 5197|       |          */
 5198|    528|          parser->m_declEntity->is_internal
 5199|    528|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5199:20): [True: 0, False: 528]
  |  Branch (5199:46): [True: 0, False: 528]
  ------------------
 5200|    528|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5200:15): [True: 0, False: 528]
  ------------------
 5201|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5202|    528|        }
 5203|  3.63k|      } else {
 5204|    618|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    618|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5205|    618|        parser->m_declEntity = NULL;
 5206|    618|      }
 5207|       |#else  /* not XML_DTD */
 5208|       |      parser->m_declEntity = NULL;
 5209|       |#endif /* XML_DTD */
 5210|  4.24k|      break;
 5211|  4.24k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5211:5): [True: 1.83k, False: 6.16M]
  ------------------
 5212|  1.83k|      parser->m_declNotationPublicId = NULL;
 5213|  1.83k|      parser->m_declNotationName = NULL;
 5214|  1.83k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5214:11): [True: 0, False: 1.83k]
  ------------------
 5215|      0|        parser->m_declNotationName
 5216|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5217|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5217:13): [True: 0, False: 0]
  ------------------
 5218|      0|          return XML_ERROR_NO_MEMORY;
 5219|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5220|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5221|      0|      }
 5222|  1.83k|      break;
 5223|  1.83k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5223:5): [True: 1.46k, False: 6.16M]
  ------------------
 5224|  1.46k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  1.46k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5224:11): [True: 1, False: 1.46k]
  ------------------
 5225|      1|        return XML_ERROR_PUBLICID;
 5226|  1.46k|      if (parser
  ------------------
  |  Branch (5226:11): [True: 0, False: 1.46k]
  ------------------
 5227|  1.46k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5228|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5229|      0|                                        s + enc->minBytesPerChar,
 5230|      0|                                        next - enc->minBytesPerChar);
 5231|      0|        if (! tem)
  ------------------
  |  Branch (5231:13): [True: 0, False: 0]
  ------------------
 5232|      0|          return XML_ERROR_NO_MEMORY;
 5233|      0|        normalizePublicId(tem);
 5234|      0|        parser->m_declNotationPublicId = tem;
 5235|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5236|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5237|      0|      }
 5238|  1.46k|      break;
 5239|  1.46k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5239:5): [True: 771, False: 6.16M]
  ------------------
 5240|    771|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5240:11): [True: 0, False: 771]
  |  Branch (5240:41): [True: 0, False: 0]
  ------------------
 5241|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5242|      0|                                                   s + enc->minBytesPerChar,
 5243|      0|                                                   next - enc->minBytesPerChar);
 5244|      0|        if (! systemId)
  ------------------
  |  Branch (5244:13): [True: 0, False: 0]
  ------------------
 5245|      0|          return XML_ERROR_NO_MEMORY;
 5246|      0|        *eventEndPP = s;
 5247|      0|        parser->m_notationDeclHandler(
 5248|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5249|      0|            systemId, parser->m_declNotationPublicId);
 5250|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5251|      0|      }
 5252|    771|      poolClear(&parser->m_tempPool);
 5253|    771|      break;
 5254|  1.01k|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5254:5): [True: 1.01k, False: 6.16M]
  ------------------
 5255|  1.01k|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5255:11): [True: 0, False: 1.01k]
  |  Branch (5255:45): [True: 0, False: 0]
  ------------------
 5256|      0|        *eventEndPP = s;
 5257|      0|        parser->m_notationDeclHandler(
 5258|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5259|      0|            0, parser->m_declNotationPublicId);
 5260|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5261|      0|      }
 5262|  1.01k|      poolClear(&parser->m_tempPool);
 5263|  1.01k|      break;
 5264|  1.36k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5264:5): [True: 1.36k, False: 6.16M]
  ------------------
 5265|  1.36k|      switch (tok) {
 5266|      5|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      5|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5266:7): [True: 5, False: 1.35k]
  ------------------
 5267|       |        /* PE references in internal subset are
 5268|       |           not allowed within declarations. */
 5269|      5|        return XML_ERROR_PARAM_ENTITY_REF;
 5270|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5270:7): [True: 1, False: 1.36k]
  ------------------
 5271|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5272|  1.35k|      default:
  ------------------
  |  Branch (5272:7): [True: 1.35k, False: 6]
  ------------------
 5273|  1.35k|        return XML_ERROR_SYNTAX;
 5274|  1.36k|      }
 5275|      0|#ifdef XML_DTD
 5276|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5276:5): [True: 0, False: 6.16M]
  ------------------
 5277|      0|      enum XML_Error result;
 5278|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5278:11): [True: 0, False: 0]
  ------------------
 5279|      0|        reportDefault(parser, enc, s, next);
 5280|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5281|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5282|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5282:11): [True: 0, False: 0]
  ------------------
 5283|      0|        return result;
 5284|      0|      else if (! next) {
  ------------------
  |  Branch (5284:16): [True: 0, False: 0]
  ------------------
 5285|      0|        parser->m_processor = ignoreSectionProcessor;
 5286|      0|        return result;
 5287|      0|      }
 5288|      0|    } break;
 5289|      0|#endif /* XML_DTD */
 5290|  4.72M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5290:5): [True: 4.72M, False: 1.44M]
  ------------------
 5291|  4.72M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5291:11): [True: 1.28k, False: 4.72M]
  ------------------
 5292|  1.28k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5292:13): [True: 493, False: 793]
  ------------------
 5293|    493|          {
 5294|       |            /* Detect and prevent integer overflow */
 5295|    493|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5295:17): [True: 0, False: 493]
  ------------------
 5296|      0|              return XML_ERROR_NO_MEMORY;
 5297|      0|            }
 5298|       |
 5299|    493|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  714|    493|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5300|    493|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5301|    493|            if (new_connector == NULL) {
  ------------------
  |  Branch (5301:17): [True: 0, False: 493]
  ------------------
 5302|      0|              parser->m_groupSize /= 2;
 5303|      0|              return XML_ERROR_NO_MEMORY;
 5304|      0|            }
 5305|    493|            parser->m_groupConnector = new_connector;
 5306|    493|          }
 5307|       |
 5308|    493|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5308:15): [True: 0, False: 493]
  ------------------
 5309|       |            /* Detect and prevent integer overflow.
 5310|       |             * The preprocessor guard addresses the "always false" warning
 5311|       |             * from -Wtype-limits on platforms where
 5312|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5313|       |#if UINT_MAX >= SIZE_MAX
 5314|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5315|       |              return XML_ERROR_NO_MEMORY;
 5316|       |            }
 5317|       |#endif
 5318|       |
 5319|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  714|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5320|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5321|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5321:17): [True: 0, False: 0]
  ------------------
 5322|      0|              return XML_ERROR_NO_MEMORY;
 5323|      0|            dtd->scaffIndex = new_scaff_index;
 5324|      0|          }
 5325|    793|        } else {
 5326|    793|          parser->m_groupConnector
 5327|    793|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  713|    793|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5328|    793|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5328:15): [True: 0, False: 793]
  ------------------
 5329|      0|            parser->m_groupSize = 0;
 5330|      0|            return XML_ERROR_NO_MEMORY;
 5331|      0|          }
 5332|    793|        }
 5333|  1.28k|      }
 5334|  4.72M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5335|  4.72M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5335:11): [True: 0, False: 4.72M]
  ------------------
 5336|      0|        int myindex = nextScaffoldPart(parser);
 5337|      0|        if (myindex < 0)
  ------------------
  |  Branch (5337:13): [True: 0, False: 0]
  ------------------
 5338|      0|          return XML_ERROR_NO_MEMORY;
 5339|      0|        assert(dtd->scaffIndex != NULL);
 5340|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5341|      0|        dtd->scaffLevel++;
 5342|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5343|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5343:13): [True: 0, False: 0]
  ------------------
 5344|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5345|      0|      }
 5346|  4.72M|      break;
 5347|  4.72M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5347:5): [True: 209k, False: 5.95M]
  ------------------
 5348|   209k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|   209k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5348:11): [True: 1, False: 209k]
  ------------------
 5349|      1|        return XML_ERROR_SYNTAX;
 5350|   209k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|   209k|#define ASCII_COMMA 0x2C
  ------------------
 5351|   209k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5351:11): [True: 0, False: 209k]
  |  Branch (5351:29): [True: 0, False: 0]
  ------------------
 5352|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5353|   209k|      break;
 5354|  5.36k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5354:5): [True: 5.36k, False: 6.16M]
  ------------------
 5355|  5.36k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  5.36k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5355:11): [True: 1, False: 5.36k]
  ------------------
 5356|      1|        return XML_ERROR_SYNTAX;
 5357|  5.36k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5357:11): [True: 0, False: 5.36k]
  ------------------
 5358|  5.36k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5358:14): [True: 0, False: 0]
  ------------------
 5359|  5.36k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|      0|              != XML_CTYPE_MIXED)) {
 5361|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5362|      0|            = XML_CTYPE_CHOICE;
 5363|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5363:13): [True: 0, False: 0]
  ------------------
 5364|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5365|      0|      }
 5366|  5.36k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  5.36k|#define ASCII_PIPE 0x7C
  ------------------
 5367|  5.36k|      break;
 5368|  3.71k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5368:5): [True: 3.71k, False: 6.16M]
  ------------------
 5369|  3.71k|#ifdef XML_DTD
 5370|  3.71k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5370:5): [True: 0, False: 6.16M]
  ------------------
 5371|  3.71k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  3.71k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5372|  3.71k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5372:11): [True: 3.71k, False: 0]
  ------------------
 5373|  3.71k|        dtd->keepProcessing = dtd->standalone;
 5374|      0|      else {
 5375|      0|        const XML_Char *name;
 5376|      0|        ENTITY *entity;
 5377|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5378|      0|                               next - enc->minBytesPerChar);
 5379|      0|        if (! name)
  ------------------
  |  Branch (5379:13): [True: 0, False: 0]
  ------------------
 5380|      0|          return XML_ERROR_NO_MEMORY;
 5381|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5382|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5383|       |        /* first, determine if a check for an existing declaration is needed;
 5384|       |           if yes, check that the entity exists, and that it is internal,
 5385|       |           otherwise call the skipped entity handler
 5386|       |        */
 5387|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5387:13): [True: 0, False: 0]
  ------------------
 5388|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5388:16): [True: 0, False: 0]
  |  Branch (5388:17): [True: 0, False: 0]
  ------------------
 5389|      0|                                : ! dtd->hasParamEntityRefs)) {
 5390|      0|          if (! entity)
  ------------------
  |  Branch (5390:15): [True: 0, False: 0]
  ------------------
 5391|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5392|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5392:20): [True: 0, False: 0]
  ------------------
 5393|       |            /* It's hard to exhaustively search the code to be sure,
 5394|       |             * but there doesn't seem to be a way of executing the
 5395|       |             * following line.  There are two cases:
 5396|       |             *
 5397|       |             * If 'standalone' is false, the DTD must have no
 5398|       |             * parameter entities or we wouldn't have passed the outer
 5399|       |             * 'if' statement.  That means the only entity in the hash
 5400|       |             * table is the external subset name "#" which cannot be
 5401|       |             * given as a parameter entity name in XML syntax, so the
 5402|       |             * lookup must have returned NULL and we don't even reach
 5403|       |             * the test for an internal entity.
 5404|       |             *
 5405|       |             * If 'standalone' is true, it does not seem to be
 5406|       |             * possible to create entities taking this code path that
 5407|       |             * are not internal entities, so fail the test above.
 5408|       |             *
 5409|       |             * Because this analysis is very uncertain, the code is
 5410|       |             * being left in place and merely removed from the
 5411|       |             * coverage test statistics.
 5412|       |             */
 5413|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5414|      0|          }
 5415|      0|        } else if (! entity) {
  ------------------
  |  Branch (5415:20): [True: 0, False: 0]
  ------------------
 5416|      0|          dtd->keepProcessing = dtd->standalone;
 5417|       |          /* cannot report skipped entities in declarations */
 5418|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5418:15): [True: 0, False: 0]
  ------------------
 5419|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5419:18): [True: 0, False: 0]
  ------------------
 5420|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5421|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5422|      0|          }
 5423|      0|          break;
 5424|      0|        }
 5425|      0|        if (entity->open)
  ------------------
  |  Branch (5425:13): [True: 0, False: 0]
  ------------------
 5426|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5427|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5427:13): [True: 0, False: 0]
  ------------------
 5428|      0|          enum XML_Error result;
 5429|      0|          XML_Bool betweenDecl
 5430|      0|              = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
                            = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
  |  Branch (5430:18): [True: 0, False: 0]
  ------------------
 5431|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5432|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5432:15): [True: 0, False: 0]
  ------------------
 5433|      0|            return result;
 5434|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5435|      0|          break;
 5436|      0|        }
 5437|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5437:13): [True: 0, False: 0]
  ------------------
 5438|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5439|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5440|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5441|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5441:15): [True: 0, False: 0]
  ------------------
 5442|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5443|      0|                  entity->systemId, entity->publicId)) {
 5444|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5445|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5446|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5447|      0|          }
 5448|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5449|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5450|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5451:15): [True: 0, False: 0]
  ------------------
 5452|      0|            dtd->keepProcessing = dtd->standalone;
 5453|      0|            break;
 5454|      0|          }
 5455|      0|        } else {
 5456|      0|          dtd->keepProcessing = dtd->standalone;
 5457|      0|          break;
 5458|      0|        }
 5459|      0|      }
 5460|  3.71k|#endif /* XML_DTD */
 5461|  3.71k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5461:11): [True: 3.51k, False: 202]
  |  Branch (5461:32): [True: 0, False: 3.51k]
  ------------------
 5462|  3.71k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5462:14): [True: 0, False: 0]
  ------------------
 5463|      0|        return XML_ERROR_NOT_STANDALONE;
 5464|  3.71k|      break;
 5465|       |
 5466|       |      /* Element declaration stuff */
 5467|       |
 5468|  6.38k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5468:5): [True: 6.38k, False: 6.16M]
  ------------------
 5469|  6.38k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5469:11): [True: 0, False: 6.38k]
  ------------------
 5470|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5471|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          return XML_ERROR_NO_MEMORY;
 5473|      0|        dtd->scaffLevel = 0;
 5474|      0|        dtd->scaffCount = 0;
 5475|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5476|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5477|      0|      }
 5478|  6.38k|      break;
 5479|       |
 5480|  6.38k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5480:5): [True: 76, False: 6.16M]
  ------------------
 5481|    348|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5481:5): [True: 272, False: 6.16M]
  ------------------
 5482|    348|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5482:11): [True: 0, False: 348]
  ------------------
 5483|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5483:13): [True: 0, False: 0]
  ------------------
 5484|      0|          XML_Content *content
 5485|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  713|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5486|      0|          if (! content)
  ------------------
  |  Branch (5486:15): [True: 0, False: 0]
  ------------------
 5487|      0|            return XML_ERROR_NO_MEMORY;
 5488|      0|          content->quant = XML_CQUANT_NONE;
 5489|      0|          content->name = NULL;
 5490|      0|          content->numchildren = 0;
 5491|      0|          content->children = NULL;
 5492|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5492:28): [True: 0, False: 0]
  ------------------
 5493|      0|                                                          : XML_CTYPE_EMPTY);
 5494|      0|          *eventEndPP = s;
 5495|      0|          parser->m_elementDeclHandler(
 5496|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5497|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5498|      0|        }
 5499|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5500|      0|      }
 5501|    348|      break;
 5502|       |
 5503|  2.74k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5503:5): [True: 2.74k, False: 6.16M]
  ------------------
 5504|  2.74k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5504:11): [True: 0, False: 2.74k]
  ------------------
 5505|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5506|      0|            = XML_CTYPE_MIXED;
 5507|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5507:13): [True: 0, False: 0]
  ------------------
 5508|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5509|      0|      }
 5510|  2.74k|      break;
 5511|       |
 5512|   213k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5512:5): [True: 213k, False: 5.95M]
  ------------------
 5513|   213k|      quant = XML_CQUANT_NONE;
 5514|   213k|      goto elementContent;
 5515|  3.05k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5515:5): [True: 3.05k, False: 6.16M]
  ------------------
 5516|  3.05k|      quant = XML_CQUANT_OPT;
 5517|  3.05k|      goto elementContent;
 5518|  1.41k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5518:5): [True: 1.41k, False: 6.16M]
  ------------------
 5519|  1.41k|      quant = XML_CQUANT_REP;
 5520|  1.41k|      goto elementContent;
 5521|  2.08k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5521:5): [True: 2.08k, False: 6.16M]
  ------------------
 5522|  2.08k|      quant = XML_CQUANT_PLUS;
 5523|   219k|    elementContent:
 5524|   219k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5524:11): [True: 0, False: 219k]
  ------------------
 5525|      0|        ELEMENT_TYPE *el;
 5526|      0|        const XML_Char *name;
 5527|      0|        size_t nameLen;
 5528|      0|        const char *nxt
 5529|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5529:16): [True: 0, False: 0]
  ------------------
 5530|      0|        int myindex = nextScaffoldPart(parser);
 5531|      0|        if (myindex < 0)
  ------------------
  |  Branch (5531:13): [True: 0, False: 0]
  ------------------
 5532|      0|          return XML_ERROR_NO_MEMORY;
 5533|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5534|      0|        dtd->scaffold[myindex].quant = quant;
 5535|      0|        el = getElementType(parser, enc, s, nxt);
 5536|      0|        if (! el)
  ------------------
  |  Branch (5536:13): [True: 0, False: 0]
  ------------------
 5537|      0|          return XML_ERROR_NO_MEMORY;
 5538|      0|        name = el->name;
 5539|      0|        dtd->scaffold[myindex].name = name;
 5540|      0|        nameLen = 0;
 5541|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5541:16): [True: 0, False: 0]
  ------------------
 5542|      0|          ;
 5543|       |
 5544|       |        /* Detect and prevent integer overflow */
 5545|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5545:13): [True: 0, False: 0]
  ------------------
 5546|      0|          return XML_ERROR_NO_MEMORY;
 5547|      0|        }
 5548|       |
 5549|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5550|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5550:13): [True: 0, False: 0]
  ------------------
 5551|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5552|      0|      }
 5553|   219k|      break;
 5554|       |
 5555|   219k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5555:5): [True: 211k, False: 5.95M]
  ------------------
 5556|   211k|      quant = XML_CQUANT_NONE;
 5557|   211k|      goto closeGroup;
 5558|  27.3k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5558:5): [True: 27.3k, False: 6.14M]
  ------------------
 5559|  27.3k|      quant = XML_CQUANT_OPT;
 5560|  27.3k|      goto closeGroup;
 5561|  37.3k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5561:5): [True: 37.3k, False: 6.13M]
  ------------------
 5562|  37.3k|      quant = XML_CQUANT_REP;
 5563|  37.3k|      goto closeGroup;
 5564|  70.1k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5564:5): [True: 70.1k, False: 6.09M]
  ------------------
 5565|  70.1k|      quant = XML_CQUANT_PLUS;
 5566|   346k|    closeGroup:
 5567|   346k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5567:11): [True: 0, False: 346k]
  ------------------
 5568|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5568:13): [True: 0, False: 0]
  ------------------
 5569|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5570|      0|        dtd->scaffLevel--;
 5571|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5572|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5572:13): [True: 0, False: 0]
  ------------------
 5573|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5573:15): [True: 0, False: 0]
  ------------------
 5574|      0|            XML_Content *model = build_model(parser);
 5575|      0|            if (! model)
  ------------------
  |  Branch (5575:17): [True: 0, False: 0]
  ------------------
 5576|      0|              return XML_ERROR_NO_MEMORY;
 5577|      0|            *eventEndPP = s;
 5578|      0|            parser->m_elementDeclHandler(
 5579|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5580|      0|          }
 5581|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5582|      0|          dtd->contentStringLen = 0;
 5583|      0|        }
 5584|      0|      }
 5585|   346k|      break;
 5586|       |      /* End element declaration stuff */
 5587|       |
 5588|   346k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5588:5): [True: 6.68k, False: 6.16M]
  ------------------
 5589|  6.68k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5589:11): [True: 0, False: 6.68k]
  ------------------
 5590|      0|        return XML_ERROR_NO_MEMORY;
 5591|  6.68k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  6.68k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5592|  6.68k|      break;
 5593|  1.07k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5593:5): [True: 1.07k, False: 6.16M]
  ------------------
 5594|  1.07k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5594:11): [True: 0, False: 1.07k]
  ------------------
 5595|      0|        return XML_ERROR_NO_MEMORY;
 5596|  1.07k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.07k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5597|  1.07k|      break;
 5598|  17.5k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5598:5): [True: 17.5k, False: 6.15M]
  ------------------
 5599|  17.5k|      switch (tok) {
  ------------------
  |  Branch (5599:15): [True: 10.0k, False: 7.53k]
  ------------------
 5600|  7.53k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  7.53k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5600:7): [True: 7.53k, False: 10.0k]
  ------------------
 5601|  7.53k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  7.53k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5602|  7.53k|        break;
 5603|  17.5k|      }
 5604|  17.5k|      break;
 5605|  17.6k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5605:5): [True: 17.6k, False: 6.15M]
  ------------------
 5606|  17.6k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5606:11): [True: 0, False: 17.6k]
  ------------------
 5607|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5608|  17.6k|      break;
 5609|  66.2k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5609:5): [True: 66.2k, False: 6.10M]
  ------------------
 5610|  66.2k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5610:11): [True: 57.1k, False: 9.13k]
  |  Branch (5610:34): [True: 0, False: 57.1k]
  ------------------
 5611|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5612|  66.2k|      break;
 5613|  10.9k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5613:5): [True: 10.9k, False: 6.15M]
  ------------------
 5614|  10.9k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5614:11): [True: 0, False: 10.9k]
  ------------------
 5615|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5616|  10.9k|      break;
 5617|   187k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5617:5): [True: 187k, False: 5.98M]
  ------------------
 5618|   187k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5618:11): [True: 184k, False: 2.33k]
  |  Branch (5618:34): [True: 0, False: 184k]
  ------------------
 5619|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5620|   187k|      break;
 5621|   132k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5621:5): [True: 132k, False: 6.03M]
  ------------------
 5622|   132k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5622:11): [True: 0, False: 132k]
  ------------------
 5623|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5624|   132k|      break;
 5625|  6.16M|    } /* end of big switch */
 5626|       |
 5627|  6.15M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5627:9): [True: 6.14M, False: 15.3k]
  |  Branch (5627:26): [True: 0, False: 6.14M]
  ------------------
 5628|      0|      reportDefault(parser, enc, s, next);
 5629|       |
 5630|  6.15M|    switch (parser->m_parsingStatus.parsing) {
 5631|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5631:5): [True: 0, False: 6.15M]
  ------------------
 5632|      0|      *nextPtr = next;
 5633|      0|      return XML_ERROR_NONE;
 5634|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5634:5): [True: 0, False: 6.15M]
  ------------------
 5635|      0|      return XML_ERROR_ABORTED;
 5636|  6.15M|    default:
  ------------------
  |  Branch (5636:5): [True: 6.15M, False: 0]
  ------------------
 5637|  6.15M|      s = next;
 5638|  6.15M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  6.15M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  6.15M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5639|  6.15M|    }
 5640|  6.15M|  }
 5641|       |  /* not reached */
 5642|  20.0k|}
xmlparse.c:accountingDiffTolerated:
 7736|   420M|                        enum XML_Account account) {
 7737|       |  /* Note: We need to check the token type *first* to be sure that
 7738|       |   *       we can even access variable <after>, safely.
 7739|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7740|   420M|  switch (tok) {
  ------------------
  |  Branch (7740:11): [True: 419M, False: 633k]
  ------------------
 7741|  2.37k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.37k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7741:3): [True: 2.37k, False: 420M]
  ------------------
 7742|  4.81k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  4.81k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7742:3): [True: 2.43k, False: 420M]
  ------------------
 7743|  5.27k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.27k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7743:3): [True: 466, False: 420M]
  ------------------
 7744|   633k|  case XML_TOK_NONE:
  ------------------
  |  |   51|   633k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7744:3): [True: 628k, False: 419M]
  ------------------
 7745|   633k|    return XML_TRUE;
  ------------------
  |  |   55|   633k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7746|   420M|  }
 7747|       |
 7748|   419M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7748:7): [True: 3.59M, False: 416M]
  ------------------
 7749|  3.59M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  3.59M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7750|       |
 7751|   416M|  unsigned int levelsAwayFromRootParser;
 7752|   416M|  const XML_Parser rootParser
 7753|   416M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7754|   416M|  assert(! rootParser->m_parentParser);
 7755|       |
 7756|   416M|  const int isDirect
 7757|   416M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7757:9): [True: 10.6M, False: 405M]
  |  Branch (7757:44): [True: 10.6M, False: 0]
  ------------------
 7758|   416M|  const ptrdiff_t bytesMore = after - before;
 7759|       |
 7760|   416M|  XmlBigCount *const additionTarget
 7761|   416M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7761:9): [True: 10.6M, False: 405M]
  ------------------
 7762|   416M|                 : &rootParser->m_accounting.countBytesIndirect;
 7763|       |
 7764|       |  /* Detect and avoid integer overflow */
 7765|   416M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7765:7): [True: 0, False: 416M]
  ------------------
 7766|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7767|   416M|  *additionTarget += bytesMore;
 7768|       |
 7769|   416M|  const XmlBigCount countBytesOutput
 7770|   416M|      = rootParser->m_accounting.countBytesDirect
 7771|   416M|        + rootParser->m_accounting.countBytesIndirect;
 7772|   416M|  const float amplificationFactor
 7773|   416M|      = accountingGetCurrentAmplification(rootParser);
 7774|   416M|  const XML_Bool tolerated
 7775|   416M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7775:9): [True: 141M, False: 274M]
  ------------------
 7776|   416M|        || (amplificationFactor
  ------------------
  |  Branch (7776:12): [True: 274M, False: 48]
  ------------------
 7777|   274M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7778|       |
 7779|   416M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7779:7): [True: 0, False: 416M]
  ------------------
 7780|      0|    accountingReportStats(rootParser, "");
 7781|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7782|      0|                         bytesMore, source_line, account);
 7783|      0|  }
 7784|       |
 7785|   416M|  return tolerated;
 7786|   416M|}
xmlparse.c:getRootParserOf:
 7851|   417M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7852|   417M|  XML_Parser rootParser = parser;
 7853|   417M|  unsigned int stepsTakenUpwards = 0;
 7854|   417M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7854:10): [True: 0, False: 417M]
  ------------------
 7855|      0|    rootParser = rootParser->m_parentParser;
 7856|      0|    stepsTakenUpwards++;
 7857|      0|  }
 7858|   417M|  assert(! rootParser->m_parentParser);
 7859|   417M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7859:7): [True: 416M, False: 1.15M]
  ------------------
 7860|   416M|    *outLevelDiff = stepsTakenUpwards;
 7861|   416M|  }
 7862|   417M|  return rootParser;
 7863|   417M|}
xmlparse.c:accountingGetCurrentAmplification:
 7659|   416M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7660|   416M|  const XmlBigCount countBytesOutput
 7661|   416M|      = rootParser->m_accounting.countBytesDirect
 7662|   416M|        + rootParser->m_accounting.countBytesIndirect;
 7663|   416M|  const float amplificationFactor
 7664|   416M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7664:9): [True: 416M, False: 0]
  ------------------
 7665|   416M|            ? (countBytesOutput
 7666|   416M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7667|   416M|            : 1.0f;
 7668|   416M|  assert(! rootParser->m_parentParser);
 7669|   416M|  return amplificationFactor;
 7670|   416M|}
xmlparse.c:accountingReportStats:
 7673|     48|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7674|     48|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7675|     48|  assert(! rootParser->m_parentParser);
 7676|       |
 7677|     48|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7677:7): [True: 48, False: 0]
  ------------------
 7678|     48|    return;
 7679|     48|  }
 7680|       |
 7681|      0|  const float amplificationFactor
 7682|      0|      = accountingGetCurrentAmplification(rootParser);
 7683|      0|  fprintf(stderr,
 7684|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7685|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7686|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7687|      0|          rootParser->m_accounting.countBytesIndirect,
 7688|      0|          (double)amplificationFactor, epilog);
 7689|      0|}
xmlparse.c:accountingOnAbort:
 7692|     48|accountingOnAbort(XML_Parser originParser) {
 7693|     48|  accountingReportStats(originParser, " ABORTING\n");
 7694|     48|}
xmlparse.c:processXmlDecl:
 4279|    315|               const char *next) {
 4280|    315|  const char *encodingName = NULL;
 4281|    315|  const XML_Char *storedEncName = NULL;
 4282|    315|  const ENCODING *newEncoding = NULL;
 4283|    315|  const char *version = NULL;
 4284|    315|  const char *versionend = NULL;
 4285|    315|  const XML_Char *storedversion = NULL;
 4286|    315|  int standalone = -1;
 4287|       |
 4288|    315|#ifdef XML_DTD
 4289|    315|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    315|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4289:7): [True: 0, False: 315]
  ------------------
 4290|    315|                                XML_ACCOUNT_DIRECT)) {
 4291|      0|    accountingOnAbort(parser);
 4292|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4293|      0|  }
 4294|    315|#endif
 4295|       |
 4296|    315|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4296:7): [True: 237, False: 78]
  |  Branch (4296:10): [True: 0, False: 315]
  ------------------
 4297|    315|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4298|    315|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4299|    237|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4299:9): [True: 0, False: 237]
  ------------------
 4300|      0|      return XML_ERROR_TEXT_DECL;
 4301|    237|    else
 4302|    237|      return XML_ERROR_XML_DECL;
 4303|    237|  }
 4304|     78|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4304:7): [True: 78, False: 0]
  |  Branch (4304:32): [True: 26, False: 52]
  ------------------
 4305|     26|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     26|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4306|     26|#ifdef XML_DTD
 4307|     26|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4307:9): [True: 0, False: 26]
  ------------------
 4308|     26|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4309|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4310|     26|#endif /* XML_DTD */
 4311|     26|  }
 4312|     78|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4312:7): [True: 0, False: 78]
  ------------------
 4313|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4313:9): [True: 0, False: 0]
  ------------------
 4314|      0|      storedEncName = poolStoreString(
 4315|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4316|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4317|      0|      if (! storedEncName)
  ------------------
  |  Branch (4317:11): [True: 0, False: 0]
  ------------------
 4318|      0|        return XML_ERROR_NO_MEMORY;
 4319|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4320|      0|    }
 4321|      0|    if (version) {
  ------------------
  |  Branch (4321:9): [True: 0, False: 0]
  ------------------
 4322|      0|      storedversion
 4323|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4324|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4325|      0|      if (! storedversion)
  ------------------
  |  Branch (4325:11): [True: 0, False: 0]
  ------------------
 4326|      0|        return XML_ERROR_NO_MEMORY;
 4327|      0|    }
 4328|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4329|      0|                             standalone);
 4330|     78|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4330:14): [True: 0, False: 78]
  ------------------
 4331|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4332|     78|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4332:7): [True: 0, False: 78]
  ------------------
 4333|      0|    if (newEncoding) {
  ------------------
  |  Branch (4333:9): [True: 0, False: 0]
  ------------------
 4334|       |      /* Check that the specified encoding does not conflict with what
 4335|       |       * the parser has already deduced.  Do we have the same number
 4336|       |       * of bytes in the smallest representation of a character?  If
 4337|       |       * this is UTF-16, is it the same endianness?
 4338|       |       */
 4339|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4339:11): [True: 0, False: 0]
  ------------------
 4340|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4340:15): [True: 0, False: 0]
  ------------------
 4341|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4341:18): [True: 0, False: 0]
  ------------------
 4342|      0|        parser->m_eventPtr = encodingName;
 4343|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4344|      0|      }
 4345|      0|      parser->m_encoding = newEncoding;
 4346|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4346:16): [True: 0, False: 0]
  ------------------
 4347|      0|      enum XML_Error result;
 4348|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4348:11): [True: 0, False: 0]
  ------------------
 4349|      0|        storedEncName = poolStoreString(
 4350|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4351|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4352|      0|        if (! storedEncName)
  ------------------
  |  Branch (4352:13): [True: 0, False: 0]
  ------------------
 4353|      0|          return XML_ERROR_NO_MEMORY;
 4354|      0|      }
 4355|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4356|      0|      poolClear(&parser->m_temp2Pool);
 4357|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4357:11): [True: 0, False: 0]
  ------------------
 4358|      0|        parser->m_eventPtr = encodingName;
 4359|      0|      return result;
 4360|      0|    }
 4361|      0|  }
 4362|       |
 4363|     78|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4363:7): [True: 0, False: 78]
  |  Branch (4363:24): [True: 0, False: 78]
  ------------------
 4364|      0|    poolClear(&parser->m_temp2Pool);
 4365|       |
 4366|     78|  return XML_ERROR_NONE;
 4367|     78|}
xmlparse.c:poolStoreString:
 7283|   764k|                const char *end) {
 7284|   764k|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7284:7): [True: 0, False: 764k]
  ------------------
 7285|      0|    return NULL;
 7286|   764k|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7286:7): [True: 275, False: 763k]
  |  Branch (7286:33): [True: 0, False: 275]
  ------------------
 7287|      0|    return NULL;
 7288|   764k|  *(pool->ptr)++ = 0;
 7289|   764k|  return pool->start;
 7290|   764k|}
xmlparse.c:lookup:
 7042|  3.96M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7043|  3.96M|  size_t i;
 7044|  3.96M|  if (table->size == 0) {
  ------------------
  |  Branch (7044:7): [True: 38.3k, False: 3.92M]
  ------------------
 7045|  38.3k|    size_t tsize;
 7046|  38.3k|    if (! createSize)
  ------------------
  |  Branch (7046:9): [True: 20.5k, False: 17.7k]
  ------------------
 7047|  20.5k|      return NULL;
 7048|  17.7k|    table->power = INIT_POWER;
  ------------------
  |  | 7006|  17.7k|#define INIT_POWER 6
  ------------------
 7049|       |    /* table->size is a power of 2 */
 7050|  17.7k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7006|  17.7k|#define INIT_POWER 6
  ------------------
 7051|  17.7k|    tsize = table->size * sizeof(NAMED *);
 7052|  17.7k|    table->v = table->mem->malloc_fcn(tsize);
 7053|  17.7k|    if (! table->v) {
  ------------------
  |  Branch (7053:9): [True: 0, False: 17.7k]
  ------------------
 7054|      0|      table->size = 0;
 7055|      0|      return NULL;
 7056|      0|    }
 7057|  17.7k|    memset(table->v, 0, tsize);
 7058|  17.7k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7059|  3.92M|  } else {
 7060|  3.92M|    unsigned long h = hash(parser, name);
 7061|  3.92M|    unsigned long mask = (unsigned long)table->size - 1;
 7062|  3.92M|    unsigned char step = 0;
 7063|  3.92M|    i = h & mask;
 7064|  5.02M|    while (table->v[i]) {
  ------------------
  |  Branch (7064:12): [True: 4.94M, False: 77.3k]
  ------------------
 7065|  4.94M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7065:11): [True: 3.84M, False: 1.10M]
  ------------------
 7066|  3.84M|        return table->v[i];
 7067|  1.10M|      if (! step)
  ------------------
  |  Branch (7067:11): [True: 822k, False: 277k]
  ------------------
 7068|   822k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  234|   822k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|   822k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7069|  1.10M|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7069:7): [True: 9.76k, False: 1.09M]
  ------------------
 7070|  1.10M|    }
 7071|  77.3k|    if (! createSize)
  ------------------
  |  Branch (7071:9): [True: 59.2k, False: 18.0k]
  ------------------
 7072|  59.2k|      return NULL;
 7073|       |
 7074|       |    /* check for overflow (table is half full) */
 7075|  18.0k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7075:9): [True: 225, False: 17.8k]
  ------------------
 7076|    225|      unsigned char newPower = table->power + 1;
 7077|       |
 7078|       |      /* Detect and prevent invalid shift */
 7079|    225|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7079:11): [True: 0, False: 225]
  ------------------
 7080|      0|        return NULL;
 7081|      0|      }
 7082|       |
 7083|    225|      size_t newSize = (size_t)1 << newPower;
 7084|    225|      unsigned long newMask = (unsigned long)newSize - 1;
 7085|       |
 7086|       |      /* Detect and prevent integer overflow */
 7087|    225|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7087:11): [True: 0, False: 225]
  ------------------
 7088|      0|        return NULL;
 7089|      0|      }
 7090|       |
 7091|    225|      size_t tsize = newSize * sizeof(NAMED *);
 7092|    225|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7093|    225|      if (! newV)
  ------------------
  |  Branch (7093:11): [True: 0, False: 225]
  ------------------
 7094|      0|        return NULL;
 7095|    225|      memset(newV, 0, tsize);
 7096|  25.2k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7096:19): [True: 25.0k, False: 225]
  ------------------
 7097|  25.0k|        if (table->v[i]) {
  ------------------
  |  Branch (7097:13): [True: 12.5k, False: 12.5k]
  ------------------
 7098|  12.5k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7099|  12.5k|          size_t j = newHash & newMask;
 7100|  12.5k|          step = 0;
 7101|  14.6k|          while (newV[j]) {
  ------------------
  |  Branch (7101:18): [True: 2.14k, False: 12.5k]
  ------------------
 7102|  2.14k|            if (! step)
  ------------------
  |  Branch (7102:17): [True: 1.67k, False: 461]
  ------------------
 7103|  1.67k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  234|  1.67k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|  1.67k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7104|  2.14k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7104:13): [True: 271, False: 1.86k]
  ------------------
 7105|  2.14k|          }
 7106|  12.5k|          newV[j] = table->v[i];
 7107|  12.5k|        }
 7108|    225|      table->mem->free_fcn(table->v);
 7109|    225|      table->v = newV;
 7110|    225|      table->power = newPower;
 7111|    225|      table->size = newSize;
 7112|    225|      i = h & newMask;
 7113|    225|      step = 0;
 7114|    391|      while (table->v[i]) {
  ------------------
  |  Branch (7114:14): [True: 166, False: 225]
  ------------------
 7115|    166|        if (! step)
  ------------------
  |  Branch (7115:13): [True: 84, False: 82]
  ------------------
 7116|     84|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  234|     84|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|     84|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7117|    166|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7117:9): [True: 24, False: 142]
  ------------------
 7118|    166|      }
 7119|    225|    }
 7120|  18.0k|  }
 7121|  35.8k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7122|  35.8k|  if (! table->v[i])
  ------------------
  |  Branch (7122:7): [True: 0, False: 35.8k]
  ------------------
 7123|      0|    return NULL;
 7124|  35.8k|  memset(table->v[i], 0, createSize);
 7125|  35.8k|  table->v[i]->name = name;
 7126|  35.8k|  (table->used)++;
 7127|  35.8k|  return table->v[i];
 7128|  35.8k|}
xmlparse.c:hash:
 7031|  3.95M|hash(XML_Parser parser, KEY s) {
 7032|  3.95M|  struct siphash state;
 7033|  3.95M|  struct sipkey key;
 7034|  3.95M|  (void)sip24_valid;
 7035|  3.95M|  copy_salt_to_sipkey(parser, &key);
 7036|  3.95M|  sip24_init(&state, &key);
 7037|  3.95M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7038|  3.95M|  return (unsigned long)sip24_final(&state);
 7039|  3.95M|}
xmlparse.c:copy_salt_to_sipkey:
 7025|  3.95M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7026|  3.95M|  key->k[0] = 0;
 7027|  3.95M|  key->k[1] = get_hash_secret_salt(parser);
 7028|  3.95M|}
xmlparse.c:get_hash_secret_salt:
  946|  3.95M|get_hash_secret_salt(XML_Parser parser) {
  947|  3.95M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (947:7): [True: 0, False: 3.95M]
  ------------------
  948|      0|    return get_hash_secret_salt(parser->m_parentParser);
  949|  3.95M|  return parser->m_hash_secret_salt;
  950|  3.95M|}
xmlparse.c:keylen:
 7017|  3.95M|keylen(KEY s) {
 7018|  3.95M|  size_t len = 0;
 7019|  13.9M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7019:10): [True: 9.95M, False: 3.95M]
  ------------------
 7020|  9.95M|    ;
 7021|  3.95M|  return len;
 7022|  3.95M|}
xmlparse.c:keyeq:
 7009|  4.94M|keyeq(KEY s1, KEY s2) {
 7010|  10.3M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7010:10): [True: 9.28M, False: 1.10M]
  ------------------
 7011|  9.28M|    if (*s1 == 0)
  ------------------
  |  Branch (7011:9): [True: 3.84M, False: 5.44M]
  ------------------
 7012|  3.84M|      return XML_TRUE;
  ------------------
  |  |   55|  3.84M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7013|  1.10M|  return XML_FALSE;
  ------------------
  |  |   56|  1.10M|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7014|  4.94M|}
xmlparse.c:normalizePublicId:
 6694|    815|normalizePublicId(XML_Char *publicId) {
 6695|    815|  XML_Char *p = publicId;
 6696|    815|  XML_Char *s;
 6697|  27.1k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6697:22): [True: 26.3k, False: 815]
  ------------------
 6698|  26.3k|    switch (*s) {
 6699|  1.00k|    case 0x20:
  ------------------
  |  Branch (6699:5): [True: 1.00k, False: 25.3k]
  ------------------
 6700|  1.64k|    case 0xD:
  ------------------
  |  Branch (6700:5): [True: 638, False: 25.7k]
  ------------------
 6701|  2.88k|    case 0xA:
  ------------------
  |  Branch (6701:5): [True: 1.23k, False: 25.1k]
  ------------------
 6702|  2.88k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6702:11): [True: 1.45k, False: 1.42k]
  |  Branch (6702:28): [True: 599, False: 860]
  ------------------
 6703|    599|        *p++ = 0x20;
 6704|  2.88k|      break;
 6705|  23.4k|    default:
  ------------------
  |  Branch (6705:5): [True: 23.4k, False: 2.88k]
  ------------------
 6706|  23.4k|      *p++ = *s;
 6707|  26.3k|    }
 6708|  26.3k|  }
 6709|    815|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6709:7): [True: 633, False: 182]
  |  Branch (6709:24): [True: 47, False: 586]
  ------------------
 6710|     47|    --p;
 6711|    815|  *p = XML_T('\0');
  ------------------
  |  |  190|    815|#  define XML_T(x) x
  ------------------
 6712|    815|}
xmlparse.c:contentProcessor:
 2621|  11.5k|                 const char **endPtr) {
 2622|  11.5k|  enum XML_Error result = doContent(
 2623|  11.5k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2624|  11.5k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2625|  11.5k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2625:7): [True: 7.25k, False: 4.28k]
  ------------------
 2626|  7.25k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2626:9): [True: 0, False: 7.25k]
  ------------------
 2627|      0|      return XML_ERROR_NO_MEMORY;
 2628|  7.25k|  }
 2629|  11.5k|  return result;
 2630|  11.5k|}
xmlparse.c:doContent:
 2751|   275k|          XML_Bool haveMore, enum XML_Account account) {
 2752|       |  /* save one level of indirection */
 2753|   275k|  DTD *const dtd = parser->m_dtd;
 2754|       |
 2755|   275k|  const char **eventPP;
 2756|   275k|  const char **eventEndPP;
 2757|   275k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2757:7): [True: 11.5k, False: 264k]
  ------------------
 2758|  11.5k|    eventPP = &parser->m_eventPtr;
 2759|  11.5k|    eventEndPP = &parser->m_eventEndPtr;
 2760|   264k|  } else {
 2761|   264k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2762|   264k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2763|   264k|  }
 2764|   275k|  *eventPP = s;
 2765|       |
 2766|   110M|  for (;;) {
 2767|   110M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2768|   110M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|   110M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   110M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2769|   110M|#ifdef XML_DTD
 2770|   110M|    const char *accountAfter
 2771|   110M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|   110M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|   110M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2771:12): [True: 1.28k, False: 110M]
  |  Branch (2771:46): [True: 52, False: 110M]
  ------------------
 2772|   110M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2772:18): [True: 79, False: 1.25k]
  ------------------
 2773|   110M|              : next;
 2774|   110M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2774:9): [True: 26, False: 110M]
  ------------------
 2775|   110M|                                  account)) {
 2776|     26|      accountingOnAbort(parser);
 2777|     26|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2778|     26|    }
 2779|   110M|#endif
 2780|   110M|    *eventEndPP = next;
 2781|   110M|    switch (tok) {
 2782|     52|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     52|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2782:5): [True: 52, False: 110M]
  ------------------
 2783|     52|      if (haveMore) {
  ------------------
  |  Branch (2783:11): [True: 52, False: 0]
  ------------------
 2784|     52|        *nextPtr = s;
 2785|     52|        return XML_ERROR_NONE;
 2786|     52|      }
 2787|      0|      *eventEndPP = end;
 2788|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2788:11): [True: 0, False: 0]
  ------------------
 2789|      0|        XML_Char c = 0xA;
 2790|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2791|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2791:18): [True: 0, False: 0]
  ------------------
 2792|      0|        reportDefault(parser, enc, s, end);
 2793|       |      /* We are at the end of the final buffer, should we check for
 2794|       |         XML_SUSPENDED, XML_FINISHED?
 2795|       |      */
 2796|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2796:11): [True: 0, False: 0]
  ------------------
 2797|      0|        return XML_ERROR_NO_ELEMENTS;
 2798|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2798:11): [True: 0, False: 0]
  ------------------
 2799|      0|        return XML_ERROR_ASYNC_ENTITY;
 2800|      0|      *nextPtr = end;
 2801|      0|      return XML_ERROR_NONE;
 2802|   266k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   266k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2802:5): [True: 266k, False: 110M]
  ------------------
 2803|   266k|      if (haveMore) {
  ------------------
  |  Branch (2803:11): [True: 3.99k, False: 262k]
  ------------------
 2804|  3.99k|        *nextPtr = s;
 2805|  3.99k|        return XML_ERROR_NONE;
 2806|  3.99k|      }
 2807|   262k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2807:11): [True: 262k, False: 0]
  ------------------
 2808|   262k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2808:13): [True: 93, False: 262k]
  ------------------
 2809|     93|          return XML_ERROR_ASYNC_ENTITY;
 2810|   262k|        *nextPtr = s;
 2811|   262k|        return XML_ERROR_NONE;
 2812|   262k|      }
 2813|      0|      return XML_ERROR_NO_ELEMENTS;
 2814|  2.16k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.16k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2814:5): [True: 2.16k, False: 110M]
  ------------------
 2815|  2.16k|      *eventPP = next;
 2816|  2.16k|      return XML_ERROR_INVALID_TOKEN;
 2817|  2.29k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.29k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2817:5): [True: 2.29k, False: 110M]
  ------------------
 2818|  2.29k|      if (haveMore) {
  ------------------
  |  Branch (2818:11): [True: 2.15k, False: 145]
  ------------------
 2819|  2.15k|        *nextPtr = s;
 2820|  2.15k|        return XML_ERROR_NONE;
 2821|  2.15k|      }
 2822|    145|      return XML_ERROR_UNCLOSED_TOKEN;
 2823|    316|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    316|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2823:5): [True: 316, False: 110M]
  ------------------
 2824|    316|      if (haveMore) {
  ------------------
  |  Branch (2824:11): [True: 316, False: 0]
  ------------------
 2825|    316|        *nextPtr = s;
 2826|    316|        return XML_ERROR_NONE;
 2827|    316|      }
 2828|      0|      return XML_ERROR_PARTIAL_CHAR;
 2829|   322k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   322k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2829:5): [True: 322k, False: 110M]
  ------------------
 2830|   322k|      const XML_Char *name;
 2831|   322k|      ENTITY *entity;
 2832|   322k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   322k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2833|   322k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2834|   322k|      if (ch) {
  ------------------
  |  Branch (2834:11): [True: 2.80k, False: 319k]
  ------------------
 2835|  2.80k|#ifdef XML_DTD
 2836|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2837|       |         *       so there is no amplification and hence recording without
 2838|       |         *       protection. */
 2839|  2.80k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2840|  2.80k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2841|  2.80k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2842|  2.80k|#endif /* XML_DTD */
 2843|  2.80k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2843:13): [True: 0, False: 2.80k]
  ------------------
 2844|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2845|  2.80k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2845:18): [True: 0, False: 2.80k]
  ------------------
 2846|      0|          reportDefault(parser, enc, s, next);
 2847|  2.80k|        break;
 2848|  2.80k|      }
 2849|   319k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2850|   319k|                             next - enc->minBytesPerChar);
 2851|   319k|      if (! name)
  ------------------
  |  Branch (2851:11): [True: 0, False: 319k]
  ------------------
 2852|      0|        return XML_ERROR_NO_MEMORY;
 2853|   319k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2854|   319k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  599|   319k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2855|       |      /* First, determine if a check for an existing declaration is needed;
 2856|       |         if yes, check that the entity exists, and that it is internal,
 2857|       |         otherwise call the skipped entity or default handler.
 2858|       |      */
 2859|   319k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2859:11): [True: 19.8k, False: 299k]
  |  Branch (2859:40): [True: 194, False: 299k]
  ------------------
 2860|  20.0k|        if (! entity)
  ------------------
  |  Branch (2860:13): [True: 344, False: 19.7k]
  ------------------
 2861|    344|          return XML_ERROR_UNDEFINED_ENTITY;
 2862|  19.7k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2862:18): [True: 0, False: 19.7k]
  ------------------
 2863|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2864|   299k|      } else if (! entity) {
  ------------------
  |  Branch (2864:18): [True: 54.9k, False: 244k]
  ------------------
 2865|  54.9k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2865:13): [True: 0, False: 54.9k]
  ------------------
 2866|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2867|  54.9k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2867:18): [True: 0, False: 54.9k]
  ------------------
 2868|      0|          reportDefault(parser, enc, s, next);
 2869|  54.9k|        break;
 2870|  54.9k|      }
 2871|   264k|      if (entity->open)
  ------------------
  |  Branch (2871:11): [True: 2, False: 264k]
  ------------------
 2872|      2|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2873|   264k|      if (entity->notation)
  ------------------
  |  Branch (2873:11): [True: 1, False: 264k]
  ------------------
 2874|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2875|   264k|      if (entity->textPtr) {
  ------------------
  |  Branch (2875:11): [True: 264k, False: 195]
  ------------------
 2876|   264k|        enum XML_Error result;
 2877|   264k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2877:13): [True: 0, False: 264k]
  ------------------
 2878|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2878:15): [True: 0, False: 0]
  ------------------
 2879|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2880|      0|                                           0);
 2881|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2881:20): [True: 0, False: 0]
  ------------------
 2882|      0|            reportDefault(parser, enc, s, next);
 2883|      0|          break;
 2884|      0|        }
 2885|   264k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   264k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2886|   264k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2886:13): [True: 825, False: 263k]
  ------------------
 2887|    825|          return result;
 2888|   264k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2888:18): [True: 0, False: 195]
  ------------------
 2889|      0|        const XML_Char *context;
 2890|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2891|      0|        context = getContext(parser);
 2892|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2893|      0|        if (! context)
  ------------------
  |  Branch (2893:13): [True: 0, False: 0]
  ------------------
 2894|      0|          return XML_ERROR_NO_MEMORY;
 2895|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2895:13): [True: 0, False: 0]
  ------------------
 2896|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2897|      0|                entity->systemId, entity->publicId))
 2898|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2899|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2900|    195|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2900:18): [True: 0, False: 195]
  ------------------
 2901|      0|        reportDefault(parser, enc, s, next);
 2902|   263k|      break;
 2903|   264k|    }
 2904|  3.18M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  3.18M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2904:5): [True: 3.18M, False: 107M]
  ------------------
 2905|       |      /* fall through */
 2906|  3.18M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  3.18M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2906:5): [True: 7.51k, False: 110M]
  ------------------
 2907|  3.18M|      TAG *tag;
 2908|  3.18M|      enum XML_Error result;
 2909|  3.18M|      XML_Char *toPtr;
 2910|  3.18M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2910:11): [True: 7.88k, False: 3.18M]
  ------------------
 2911|  7.88k|        tag = parser->m_freeTagList;
 2912|  7.88k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2913|  3.18M|      } else {
 2914|  3.18M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  713|  3.18M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2915|  3.18M|        if (! tag)
  ------------------
  |  Branch (2915:13): [True: 0, False: 3.18M]
  ------------------
 2916|      0|          return XML_ERROR_NO_MEMORY;
 2917|  3.18M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  713|  3.18M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2918|  3.18M|        if (! tag->buf) {
  ------------------
  |  Branch (2918:13): [True: 0, False: 3.18M]
  ------------------
 2919|      0|          FREE(parser, tag);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2920|      0|          return XML_ERROR_NO_MEMORY;
 2921|      0|        }
 2922|  3.18M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  241|  3.18M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2923|  3.18M|      }
 2924|  3.18M|      tag->bindings = NULL;
 2925|  3.18M|      tag->parent = parser->m_tagStack;
 2926|  3.18M|      parser->m_tagStack = tag;
 2927|  3.18M|      tag->name.localPart = NULL;
 2928|  3.18M|      tag->name.prefix = NULL;
 2929|  3.18M|      tag->rawName = s + enc->minBytesPerChar;
 2930|  3.18M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  3.18M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2931|  3.18M|      ++parser->m_tagLevel;
 2932|  3.18M|      {
 2933|  3.18M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2934|  3.18M|        const char *fromPtr = tag->rawName;
 2935|  3.18M|        toPtr = (XML_Char *)tag->buf;
 2936|  3.19M|        for (;;) {
 2937|  3.19M|          int bufSize;
 2938|  3.19M|          int convLen;
 2939|  3.19M|          const enum XML_Convert_Result convert_res
 2940|  3.19M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  160|  3.19M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  3.19M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2941|  3.19M|                           (ICHAR *)tag->bufEnd - 1);
 2942|  3.19M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2943|  3.19M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2943:15): [True: 3.18M, False: 2.04k]
  ------------------
 2944|  3.19M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2944:18): [True: 0, False: 2.04k]
  ------------------
 2945|  3.18M|            tag->name.strLen = convLen;
 2946|  3.18M|            break;
 2947|  3.18M|          }
 2948|  2.04k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2949|  2.04k|          {
 2950|  2.04k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|  2.04k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2951|  2.04k|            if (temp == NULL)
  ------------------
  |  Branch (2951:17): [True: 0, False: 2.04k]
  ------------------
 2952|      0|              return XML_ERROR_NO_MEMORY;
 2953|  2.04k|            tag->buf = temp;
 2954|  2.04k|            tag->bufEnd = temp + bufSize;
 2955|  2.04k|            toPtr = (XML_Char *)temp + convLen;
 2956|  2.04k|          }
 2957|  2.04k|        }
 2958|  3.18M|      }
 2959|  3.18M|      tag->name.str = (XML_Char *)tag->buf;
 2960|  3.18M|      *toPtr = XML_T('\0');
  ------------------
  |  |  190|  3.18M|#  define XML_T(x) x
  ------------------
 2961|  3.18M|      result
 2962|  3.18M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2963|  3.18M|      if (result)
  ------------------
  |  Branch (2963:11): [True: 675, False: 3.18M]
  ------------------
 2964|    675|        return result;
 2965|  3.18M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2965:11): [True: 3.18M, False: 0]
  ------------------
 2966|  3.18M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2967|  3.18M|                                      (const XML_Char **)parser->m_atts);
 2968|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2968:16): [True: 0, False: 0]
  ------------------
 2969|      0|        reportDefault(parser, enc, s, next);
 2970|  3.18M|      poolClear(&parser->m_tempPool);
 2971|  3.18M|      break;
 2972|  3.18M|    }
 2973|  8.75k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  8.75k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2973:5): [True: 8.75k, False: 110M]
  ------------------
 2974|       |      /* fall through */
 2975|  18.6k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  18.6k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2975:5): [True: 9.93k, False: 110M]
  ------------------
 2976|  18.6k|      const char *rawName = s + enc->minBytesPerChar;
 2977|  18.6k|      enum XML_Error result;
 2978|  18.6k|      BINDING *bindings = NULL;
 2979|  18.6k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  18.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2980|  18.6k|      TAG_NAME name;
 2981|  18.6k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2982|  18.6k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  18.6k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2983|  18.6k|      if (! name.str)
  ------------------
  |  Branch (2983:11): [True: 0, False: 18.6k]
  ------------------
 2984|      0|        return XML_ERROR_NO_MEMORY;
 2985|  18.6k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  18.6k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2986|  18.6k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2987|  18.6k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2988|  18.6k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2988:11): [True: 59, False: 18.6k]
  ------------------
 2989|     59|        freeBindings(parser, bindings);
 2990|     59|        return result;
 2991|     59|      }
 2992|  18.6k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  18.6k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2993|  18.6k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2993:11): [True: 18.6k, False: 0]
  ------------------
 2994|  18.6k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2995|  18.6k|                                      (const XML_Char **)parser->m_atts);
 2996|  18.6k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2997|  18.6k|      }
 2998|  18.6k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2998:11): [True: 18.6k, False: 0]
  ------------------
 2999|  18.6k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (2999:13): [True: 18.6k, False: 0]
  ------------------
 3000|  18.6k|          *eventPP = *eventEndPP;
 3001|  18.6k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3002|  18.6k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3003|  18.6k|      }
 3004|  18.6k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3004:11): [True: 0, False: 18.6k]
  |  Branch (3004:28): [True: 0, False: 0]
  ------------------
 3005|      0|        reportDefault(parser, enc, s, next);
 3006|  18.6k|      poolClear(&parser->m_tempPool);
 3007|  18.6k|      freeBindings(parser, bindings);
 3008|  18.6k|    }
 3009|  18.6k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3009:11): [True: 120, False: 18.5k]
  ------------------
 3010|  18.6k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3010:14): [True: 120, False: 0]
  ------------------
 3011|    120|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3011:13): [True: 0, False: 120]
  ------------------
 3012|      0|          parser->m_processor = epilogProcessor;
 3013|    120|        else
 3014|    120|          return epilogProcessor(parser, next, end, nextPtr);
 3015|    120|      }
 3016|  18.5k|      break;
 3017|  18.5k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  8.48k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3017:5): [True: 8.48k, False: 110M]
  ------------------
 3018|  8.48k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3018:11): [True: 6, False: 8.48k]
  ------------------
 3019|      6|        return XML_ERROR_ASYNC_ENTITY;
 3020|  8.48k|      else {
 3021|  8.48k|        int len;
 3022|  8.48k|        const char *rawName;
 3023|  8.48k|        TAG *tag = parser->m_tagStack;
 3024|  8.48k|        rawName = s + enc->minBytesPerChar * 2;
 3025|  8.48k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  8.48k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3026|  8.48k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3026:13): [True: 25, False: 8.45k]
  ------------------
 3027|  8.48k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3027:16): [True: 178, False: 8.27k]
  ------------------
 3028|    203|          *eventPP = rawName;
 3029|    203|          return XML_ERROR_TAG_MISMATCH;
 3030|    203|        }
 3031|  8.27k|        parser->m_tagStack = tag->parent;
 3032|  8.27k|        tag->parent = parser->m_freeTagList;
 3033|  8.27k|        parser->m_freeTagList = tag;
 3034|  8.27k|        --parser->m_tagLevel;
 3035|  8.27k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3035:13): [True: 8.27k, False: 0]
  ------------------
 3036|  8.27k|          const XML_Char *localPart;
 3037|  8.27k|          const XML_Char *prefix;
 3038|  8.27k|          XML_Char *uri;
 3039|  8.27k|          localPart = tag->name.localPart;
 3040|  8.27k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3040:15): [True: 0, False: 8.27k]
  |  Branch (3040:31): [True: 0, False: 0]
  ------------------
 3041|       |            /* localPart and prefix may have been overwritten in
 3042|       |               tag->name.str, since this points to the binding->uri
 3043|       |               buffer which gets re-used; so we have to add them again
 3044|       |            */
 3045|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3046|       |            /* don't need to check for space - already done in storeAtts() */
 3047|      0|            while (*localPart)
  ------------------
  |  Branch (3047:20): [True: 0, False: 0]
  ------------------
 3048|      0|              *uri++ = *localPart++;
 3049|      0|            prefix = tag->name.prefix;
 3050|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3050:17): [True: 0, False: 0]
  |  Branch (3050:42): [True: 0, False: 0]
  ------------------
 3051|      0|              *uri++ = parser->m_namespaceSeparator;
 3052|      0|              while (*prefix)
  ------------------
  |  Branch (3052:22): [True: 0, False: 0]
  ------------------
 3053|      0|                *uri++ = *prefix++;
 3054|      0|            }
 3055|      0|            *uri = XML_T('\0');
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
 3056|      0|          }
 3057|  8.27k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3058|  8.27k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3058:20): [True: 0, False: 0]
  ------------------
 3059|      0|          reportDefault(parser, enc, s, next);
 3060|  8.27k|        while (tag->bindings) {
  ------------------
  |  Branch (3060:16): [True: 0, False: 8.27k]
  ------------------
 3061|      0|          BINDING *b = tag->bindings;
 3062|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3062:15): [True: 0, False: 0]
  ------------------
 3063|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3064|      0|                                              b->prefix->name);
 3065|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3066|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3067|      0|          parser->m_freeBindingList = b;
 3068|      0|          b->prefix->binding = b->prevPrefixBinding;
 3069|      0|        }
 3070|  8.27k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3070:13): [True: 20, False: 8.25k]
  ------------------
 3071|  8.27k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3071:16): [True: 20, False: 0]
  ------------------
 3072|     20|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3072:15): [True: 0, False: 20]
  ------------------
 3073|      0|            parser->m_processor = epilogProcessor;
 3074|     20|          else
 3075|     20|            return epilogProcessor(parser, next, end, nextPtr);
 3076|     20|        }
 3077|  8.27k|      }
 3078|  8.25k|      break;
 3079|  8.25k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  6.84k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3079:5): [True: 6.84k, False: 110M]
  ------------------
 3080|  6.84k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  6.84k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3081|  6.84k|      if (n < 0)
  ------------------
  |  Branch (3081:11): [True: 229, False: 6.61k]
  ------------------
 3082|    229|        return XML_ERROR_BAD_CHAR_REF;
 3083|  6.61k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3083:11): [True: 0, False: 6.61k]
  ------------------
 3084|      0|        XML_Char buf[XML_ENCODE_MAX];
 3085|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3086|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  163|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3087|  6.61k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3087:18): [True: 0, False: 6.61k]
  ------------------
 3088|      0|        reportDefault(parser, enc, s, next);
 3089|  6.61k|    } break;
 3090|     11|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|     11|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3090:5): [True: 11, False: 110M]
  ------------------
 3091|     11|      return XML_ERROR_MISPLACED_XML_PI;
 3092|  95.3M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  95.3M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3092:5): [True: 95.3M, False: 15.2M]
  ------------------
 3093|  95.3M|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3093:11): [True: 0, False: 95.3M]
  ------------------
 3094|      0|        XML_Char c = 0xA;
 3095|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3096|  95.3M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3096:18): [True: 0, False: 95.3M]
  ------------------
 3097|      0|        reportDefault(parser, enc, s, next);
 3098|  95.3M|      break;
 3099|  2.60k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  2.60k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3099:5): [True: 2.60k, False: 110M]
  ------------------
 3100|  2.60k|      enum XML_Error result;
 3101|  2.60k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3101:11): [True: 0, False: 2.60k]
  ------------------
 3102|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3103|       |      /* BEGIN disabled code */
 3104|       |      /* Suppose you doing a transformation on a document that involves
 3105|       |         changing only the character data.  You set up a defaultHandler
 3106|       |         and a characterDataHandler.  The defaultHandler simply copies
 3107|       |         characters through.  The characterDataHandler does the
 3108|       |         transformation and writes the characters out escaping them as
 3109|       |         necessary.  This case will fail to work if we leave out the
 3110|       |         following two lines (because & and < inside CDATA sections will
 3111|       |         be incorrectly escaped).
 3112|       |
 3113|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3114|       |         easier to let the user deal with this.
 3115|       |      */
 3116|  2.60k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3116:16): [Folded - Ignored]
  |  Branch (3116:23): [True: 0, False: 0]
  ------------------
 3117|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3118|      0|                                       0);
 3119|       |      /* END disabled code */
 3120|  2.60k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3120:16): [True: 0, False: 2.60k]
  ------------------
 3121|      0|        reportDefault(parser, enc, s, next);
 3122|  2.60k|      result
 3123|  2.60k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3124|  2.60k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3124:11): [True: 245, False: 2.35k]
  ------------------
 3125|    245|        return result;
 3126|  2.35k|      else if (! next) {
  ------------------
  |  Branch (3126:16): [True: 633, False: 1.72k]
  ------------------
 3127|    633|        parser->m_processor = cdataSectionProcessor;
 3128|    633|        return result;
 3129|    633|      }
 3130|  2.60k|    } break;
 3131|  1.72k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|  1.28k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3131:5): [True: 1.28k, False: 110M]
  ------------------
 3132|  1.28k|      if (haveMore) {
  ------------------
  |  Branch (3132:11): [True: 27, False: 1.25k]
  ------------------
 3133|     27|        *nextPtr = s;
 3134|     27|        return XML_ERROR_NONE;
 3135|     27|      }
 3136|  1.25k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3136:11): [True: 0, False: 1.25k]
  ------------------
 3137|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3138|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3139|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3140|      0|          parser->m_characterDataHandler(
 3141|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3142|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3143|      0|        } else
 3144|      0|          parser->m_characterDataHandler(
 3145|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3146|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3147|  1.25k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3147:18): [True: 0, False: 1.25k]
  ------------------
 3148|      0|        reportDefault(parser, enc, s, end);
 3149|       |      /* We are at the end of the final buffer, should we check for
 3150|       |         XML_SUSPENDED, XML_FINISHED?
 3151|       |      */
 3152|  1.25k|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3152:11): [True: 0, False: 1.25k]
  ------------------
 3153|      0|        *eventPP = end;
 3154|      0|        return XML_ERROR_NO_ELEMENTS;
 3155|      0|      }
 3156|  1.25k|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3156:11): [True: 12, False: 1.24k]
  ------------------
 3157|     12|        *eventPP = end;
 3158|     12|        return XML_ERROR_ASYNC_ENTITY;
 3159|     12|      }
 3160|  1.24k|      *nextPtr = end;
 3161|  1.24k|      return XML_ERROR_NONE;
 3162|  11.3M|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  11.3M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3162:5): [True: 11.3M, False: 99.2M]
  ------------------
 3163|  11.3M|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3164|  11.3M|      if (charDataHandler) {
  ------------------
  |  Branch (3164:11): [True: 0, False: 11.3M]
  ------------------
 3165|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3166|      0|          for (;;) {
 3167|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3168|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3169|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3170|      0|            *eventEndPP = s;
 3171|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3172|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3173|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3173:17): [True: 0, False: 0]
  ------------------
 3174|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3174:20): [True: 0, False: 0]
  ------------------
 3175|      0|              break;
 3176|      0|            *eventPP = s;
 3177|      0|          }
 3178|      0|        } else
 3179|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3180|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3181|  11.3M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3181:18): [True: 0, False: 11.3M]
  ------------------
 3182|      0|        reportDefault(parser, enc, s, next);
 3183|  11.3M|    } break;
 3184|  6.43k|    case XML_TOK_PI:
  ------------------
  |  |   76|  6.43k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3184:5): [True: 6.43k, False: 110M]
  ------------------
 3185|  6.43k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3185:11): [True: 0, False: 6.43k]
  ------------------
 3186|      0|        return XML_ERROR_NO_MEMORY;
 3187|  6.43k|      break;
 3188|  6.43k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    824|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3188:5): [True: 824, False: 110M]
  ------------------
 3189|    824|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3189:11): [True: 0, False: 824]
  ------------------
 3190|      0|        return XML_ERROR_NO_MEMORY;
 3191|    824|      break;
 3192|    824|    default:
  ------------------
  |  Branch (3192:5): [True: 0, False: 110M]
  ------------------
 3193|       |      /* All of the tokens produced by XmlContentTok() have their own
 3194|       |       * explicit cases, so this default is not strictly necessary.
 3195|       |       * However it is a useful safety net, so we retain the code and
 3196|       |       * simply exclude it from the coverage tests.
 3197|       |       *
 3198|       |       * LCOV_EXCL_START
 3199|       |       */
 3200|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3200:11): [True: 0, False: 0]
  ------------------
 3201|      0|        reportDefault(parser, enc, s, next);
 3202|      0|      break;
 3203|       |      /* LCOV_EXCL_STOP */
 3204|   110M|    }
 3205|   110M|    *eventPP = s = next;
 3206|   110M|    switch (parser->m_parsingStatus.parsing) {
 3207|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3207:5): [True: 0, False: 110M]
  ------------------
 3208|      0|      *nextPtr = next;
 3209|      0|      return XML_ERROR_NONE;
 3210|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3210:5): [True: 0, False: 110M]
  ------------------
 3211|      0|      return XML_ERROR_ABORTED;
 3212|   110M|    default:;
  ------------------
  |  Branch (3212:5): [True: 110M, False: 0]
  ------------------
 3213|   110M|    }
 3214|   110M|  }
 3215|       |  /* not reached */
 3216|   275k|}
xmlparse.c:hashTableIterInit:
 7158|  20.0k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7159|  20.0k|  iter->p = table->v;
 7160|  20.0k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7160:15): [True: 10.6k, False: 9.41k]
  ------------------
 7161|  20.0k|}
xmlparse.c:hashTableIterNext:
 7164|  42.0k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7165|   721k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7165:10): [True: 701k, False: 20.0k]
  ------------------
 7166|   701k|    NAMED *tem = *(iter->p)++;
 7167|   701k|    if (tem)
  ------------------
  |  Branch (7167:9): [True: 22.0k, False: 679k]
  ------------------
 7168|  22.0k|      return tem;
 7169|   701k|  }
 7170|  20.0k|  return NULL;
 7171|  42.0k|}
xmlparse.c:storeAtts:
 3253|  3.20M|          enum XML_Account account) {
 3254|  3.20M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3255|  3.20M|  ELEMENT_TYPE *elementType;
 3256|  3.20M|  int nDefaultAtts;
 3257|  3.20M|  const XML_Char **appAtts; /* the attribute list for the application */
 3258|  3.20M|  int attIndex = 0;
 3259|  3.20M|  int prefixLen;
 3260|  3.20M|  int i;
 3261|  3.20M|  int n;
 3262|  3.20M|  XML_Char *uri;
 3263|  3.20M|  int nPrefixes = 0;
 3264|  3.20M|  BINDING *binding;
 3265|  3.20M|  const XML_Char *localPart;
 3266|       |
 3267|       |  /* lookup the element type name */
 3268|  3.20M|  elementType
 3269|  3.20M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3270|  3.20M|  if (! elementType) {
  ------------------
  |  Branch (3270:7): [True: 15.9k, False: 3.19M]
  ------------------
 3271|  15.9k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3272|  15.9k|    if (! name)
  ------------------
  |  Branch (3272:9): [True: 0, False: 15.9k]
  ------------------
 3273|      0|      return XML_ERROR_NO_MEMORY;
 3274|  15.9k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3275|  15.9k|                                         sizeof(ELEMENT_TYPE));
 3276|  15.9k|    if (! elementType)
  ------------------
  |  Branch (3276:9): [True: 0, False: 15.9k]
  ------------------
 3277|      0|      return XML_ERROR_NO_MEMORY;
 3278|  15.9k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3278:9): [True: 0, False: 15.9k]
  |  Branch (3278:25): [True: 0, False: 0]
  ------------------
 3279|      0|      return XML_ERROR_NO_MEMORY;
 3280|  15.9k|  }
 3281|  3.20M|  nDefaultAtts = elementType->nDefaultAtts;
 3282|       |
 3283|       |  /* get the attributes from the tokenizer */
 3284|  3.20M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  3.20M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3285|       |
 3286|       |  /* Detect and prevent integer overflow */
 3287|  3.20M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3287:7): [True: 0, False: 3.20M]
  ------------------
 3288|      0|    return XML_ERROR_NO_MEMORY;
 3289|      0|  }
 3290|       |
 3291|  3.20M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3291:7): [True: 432, False: 3.20M]
  ------------------
 3292|    432|    int oldAttsSize = parser->m_attsSize;
 3293|    432|    ATTRIBUTE *temp;
 3294|       |#ifdef XML_ATTR_INFO
 3295|       |    XML_AttrInfo *temp2;
 3296|       |#endif
 3297|       |
 3298|       |    /* Detect and prevent integer overflow */
 3299|    432|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  243|    432|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3299:9): [True: 0, False: 432]
  ------------------
 3300|    432|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  243|    432|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:12): [True: 0, False: 432]
  ------------------
 3301|      0|      return XML_ERROR_NO_MEMORY;
 3302|      0|    }
 3303|       |
 3304|    432|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  243|    432|#define INIT_ATTS_SIZE 16
  ------------------
 3305|       |
 3306|       |    /* Detect and prevent integer overflow.
 3307|       |     * The preprocessor guard addresses the "always false" warning
 3308|       |     * from -Wtype-limits on platforms where
 3309|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3310|       |#if UINT_MAX >= SIZE_MAX
 3311|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3312|       |      parser->m_attsSize = oldAttsSize;
 3313|       |      return XML_ERROR_NO_MEMORY;
 3314|       |    }
 3315|       |#endif
 3316|       |
 3317|    432|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  714|    432|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3318|    432|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3319|    432|    if (temp == NULL) {
  ------------------
  |  Branch (3319:9): [True: 0, False: 432]
  ------------------
 3320|      0|      parser->m_attsSize = oldAttsSize;
 3321|      0|      return XML_ERROR_NO_MEMORY;
 3322|      0|    }
 3323|    432|    parser->m_atts = temp;
 3324|       |#ifdef XML_ATTR_INFO
 3325|       |    /* Detect and prevent integer overflow.
 3326|       |     * The preprocessor guard addresses the "always false" warning
 3327|       |     * from -Wtype-limits on platforms where
 3328|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3329|       |#  if UINT_MAX >= SIZE_MAX
 3330|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3331|       |      parser->m_attsSize = oldAttsSize;
 3332|       |      return XML_ERROR_NO_MEMORY;
 3333|       |    }
 3334|       |#  endif
 3335|       |
 3336|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3337|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3338|       |    if (temp2 == NULL) {
 3339|       |      parser->m_attsSize = oldAttsSize;
 3340|       |      return XML_ERROR_NO_MEMORY;
 3341|       |    }
 3342|       |    parser->m_attInfo = temp2;
 3343|       |#endif
 3344|    432|    if (n > oldAttsSize)
  ------------------
  |  Branch (3344:9): [True: 419, False: 13]
  ------------------
 3345|    419|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    419|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3346|    432|  }
 3347|       |
 3348|  3.20M|  appAtts = (const XML_Char **)parser->m_atts;
 3349|  3.23M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3349:15): [True: 24.9k, False: 3.20M]
  ------------------
 3350|  24.9k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3351|       |#ifdef XML_ATTR_INFO
 3352|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3353|       |#endif
 3354|       |    /* add the name and value to the attribute list */
 3355|  24.9k|    ATTRIBUTE_ID *attId
 3356|  24.9k|        = getAttributeId(parser, enc, currAtt->name,
 3357|  24.9k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  24.9k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3358|  24.9k|    if (! attId)
  ------------------
  |  Branch (3358:9): [True: 0, False: 24.9k]
  ------------------
 3359|      0|      return XML_ERROR_NO_MEMORY;
 3360|       |#ifdef XML_ATTR_INFO
 3361|       |    currAttInfo->nameStart
 3362|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3363|       |    currAttInfo->nameEnd
 3364|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3365|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3366|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3367|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3368|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3369|       |#endif
 3370|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3371|       |       namespace processing is turned on and different prefixes for the same
 3372|       |       namespace are used. For this case we have a check further down.
 3373|       |    */
 3374|  24.9k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3374:9): [True: 518, False: 24.4k]
  ------------------
 3375|    518|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3375:11): [True: 503, False: 15]
  ------------------
 3376|    503|        parser->m_eventPtr = parser->m_atts[i].name;
 3377|    518|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3378|    518|    }
 3379|  24.4k|    (attId->name)[-1] = 1;
 3380|  24.4k|    appAtts[attIndex++] = attId->name;
 3381|  24.4k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3381:9): [True: 14.0k, False: 10.4k]
  ------------------
 3382|  14.0k|      enum XML_Error result;
 3383|  14.0k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  14.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3384|       |
 3385|       |      /* figure out whether declared as other than CDATA */
 3386|  14.0k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3386:11): [True: 1.18k, False: 12.8k]
  ------------------
 3387|  1.18k|        int j;
 3388|  1.56k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3388:21): [True: 1.18k, False: 389]
  ------------------
 3389|  1.18k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3389:15): [True: 791, False: 389]
  ------------------
 3390|    791|            isCdata = elementType->defaultAtts[j].isCdata;
 3391|    791|            break;
 3392|    791|          }
 3393|  1.18k|        }
 3394|  1.18k|      }
 3395|       |
 3396|       |      /* normalize the attribute value */
 3397|  14.0k|      result = storeAttributeValue(
 3398|  14.0k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3399|  14.0k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3400|  14.0k|      if (result)
  ------------------
  |  Branch (3400:11): [True: 216, False: 13.7k]
  ------------------
 3401|    216|        return result;
 3402|  13.7k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|  13.7k|#define poolStart(pool) ((pool)->start)
  ------------------
 3403|  13.7k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  13.7k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3404|  13.7k|    } else {
 3405|       |      /* the value did not need normalizing */
 3406|  10.4k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3407|  10.4k|                                          parser->m_atts[i].valuePtr,
 3408|  10.4k|                                          parser->m_atts[i].valueEnd);
 3409|  10.4k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3409:11): [True: 0, False: 10.4k]
  ------------------
 3410|      0|        return XML_ERROR_NO_MEMORY;
 3411|  10.4k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  10.4k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3412|  10.4k|    }
 3413|       |    /* handle prefixed attribute names */
 3414|  24.2k|    if (attId->prefix) {
  ------------------
  |  Branch (3414:9): [True: 0, False: 24.2k]
  ------------------
 3415|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3415:11): [True: 0, False: 0]
  ------------------
 3416|       |        /* deal with namespace declarations here */
 3417|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3418|      0|                                           appAtts[attIndex], bindingsPtr);
 3419|      0|        if (result)
  ------------------
  |  Branch (3419:13): [True: 0, False: 0]
  ------------------
 3420|      0|          return result;
 3421|      0|        --attIndex;
 3422|      0|      } else {
 3423|       |        /* deal with other prefixed names later */
 3424|      0|        attIndex++;
 3425|      0|        nPrefixes++;
 3426|      0|        (attId->name)[-1] = 2;
 3427|      0|      }
 3428|      0|    } else
 3429|  24.2k|      attIndex++;
 3430|  24.2k|  }
 3431|       |
 3432|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3433|  3.20M|  parser->m_nSpecifiedAtts = attIndex;
 3434|  3.20M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3434:7): [True: 834, False: 3.20M]
  |  Branch (3434:29): [True: 440, False: 394]
  ------------------
 3435|    644|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3435:17): [True: 644, False: 0]
  ------------------
 3436|    644|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3436:11): [True: 440, False: 204]
  ------------------
 3437|    440|        parser->m_idAttIndex = i;
 3438|    440|        break;
 3439|    440|      }
 3440|    440|  } else
 3441|  3.20M|    parser->m_idAttIndex = -1;
 3442|       |
 3443|       |  /* do attribute defaulting */
 3444|  3.21M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3444:15): [True: 4.16k, False: 3.20M]
  ------------------
 3445|  4.16k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3446|  4.16k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3446:9): [True: 3.07k, False: 1.08k]
  |  Branch (3446:33): [True: 689, False: 2.38k]
  ------------------
 3447|    689|      if (da->id->prefix) {
  ------------------
  |  Branch (3447:11): [True: 0, False: 689]
  ------------------
 3448|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3448:13): [True: 0, False: 0]
  ------------------
 3449|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3450|      0|                                             da->value, bindingsPtr);
 3451|      0|          if (result)
  ------------------
  |  Branch (3451:15): [True: 0, False: 0]
  ------------------
 3452|      0|            return result;
 3453|      0|        } else {
 3454|      0|          (da->id->name)[-1] = 2;
 3455|      0|          nPrefixes++;
 3456|      0|          appAtts[attIndex++] = da->id->name;
 3457|      0|          appAtts[attIndex++] = da->value;
 3458|      0|        }
 3459|    689|      } else {
 3460|    689|        (da->id->name)[-1] = 1;
 3461|    689|        appAtts[attIndex++] = da->id->name;
 3462|    689|        appAtts[attIndex++] = da->value;
 3463|    689|      }
 3464|    689|    }
 3465|  4.16k|  }
 3466|  3.20M|  appAtts[attIndex] = 0;
 3467|       |
 3468|       |  /* expand prefixed attribute names, check for duplicates,
 3469|       |     and clear flags that say whether attributes were specified */
 3470|  3.20M|  i = 0;
 3471|  3.20M|  if (nPrefixes) {
  ------------------
  |  Branch (3471:7): [True: 0, False: 3.20M]
  ------------------
 3472|      0|    int j; /* hash table index */
 3473|      0|    unsigned long version = parser->m_nsAttsVersion;
 3474|       |
 3475|       |    /* Detect and prevent invalid shift */
 3476|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3476:9): [True: 0, False: 0]
  ------------------
 3477|      0|      return XML_ERROR_NO_MEMORY;
 3478|      0|    }
 3479|       |
 3480|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3481|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3482|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3483|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3483:9): [True: 0, False: 0]
  ------------------
 3484|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3485|      0|      NS_ATT *temp;
 3486|       |      /* hash table size must also be a power of 2 and >= 8 */
 3487|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3487:14): [True: 0, False: 0]
  ------------------
 3488|      0|        ;
 3489|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3489:11): [True: 0, False: 0]
  ------------------
 3490|      0|        parser->m_nsAttsPower = 3;
 3491|       |
 3492|       |      /* Detect and prevent invalid shift */
 3493|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3493:11): [True: 0, False: 0]
  ------------------
 3494|       |        /* Restore actual size of memory in m_nsAtts */
 3495|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3496|      0|        return XML_ERROR_NO_MEMORY;
 3497|      0|      }
 3498|       |
 3499|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3500|       |
 3501|       |      /* Detect and prevent integer overflow.
 3502|       |       * The preprocessor guard addresses the "always false" warning
 3503|       |       * from -Wtype-limits on platforms where
 3504|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3505|       |#if UINT_MAX >= SIZE_MAX
 3506|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3507|       |        /* Restore actual size of memory in m_nsAtts */
 3508|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3509|       |        return XML_ERROR_NO_MEMORY;
 3510|       |      }
 3511|       |#endif
 3512|       |
 3513|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  714|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3514|      0|                               nsAttsSize * sizeof(NS_ATT));
 3515|      0|      if (! temp) {
  ------------------
  |  Branch (3515:11): [True: 0, False: 0]
  ------------------
 3516|       |        /* Restore actual size of memory in m_nsAtts */
 3517|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3518|      0|        return XML_ERROR_NO_MEMORY;
 3519|      0|      }
 3520|      0|      parser->m_nsAtts = temp;
 3521|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3522|      0|    }
 3523|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3524|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3524:9): [True: 0, False: 0]
  ------------------
 3525|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  244|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3526|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3526:28): [True: 0, False: 0]
  ------------------
 3527|      0|        parser->m_nsAtts[--j].version = version;
 3528|      0|    }
 3529|      0|    parser->m_nsAttsVersion = --version;
 3530|       |
 3531|       |    /* expand prefixed names and check for duplicates */
 3532|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3532:12): [True: 0, False: 0]
  ------------------
 3533|      0|      const XML_Char *s = appAtts[i];
 3534|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3534:11): [True: 0, False: 0]
  ------------------
 3535|      0|        ATTRIBUTE_ID *id;
 3536|      0|        const BINDING *b;
 3537|      0|        unsigned long uriHash;
 3538|      0|        struct siphash sip_state;
 3539|      0|        struct sipkey sip_key;
 3540|       |
 3541|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3542|      0|        sip24_init(&sip_state, &sip_key);
 3543|       |
 3544|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3545|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3546|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3546:13): [True: 0, False: 0]
  |  Branch (3546:21): [True: 0, False: 0]
  ------------------
 3547|       |          /* This code is walking through the appAtts array, dealing
 3548|       |           * with (in this case) a prefixed attribute name.  To be in
 3549|       |           * the array, the attribute must have already been bound, so
 3550|       |           * has to have passed through the hash table lookup once
 3551|       |           * already.  That implies that an entry for it already
 3552|       |           * exists, so the lookup above will return a pointer to
 3553|       |           * already allocated memory.  There is no opportunaity for
 3554|       |           * the allocator to fail, so the condition above cannot be
 3555|       |           * fulfilled.
 3556|       |           *
 3557|       |           * Since it is difficult to be certain that the above
 3558|       |           * analysis is complete, we retain the test and merely
 3559|       |           * remove the code from coverage tests.
 3560|       |           */
 3561|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3562|      0|        }
 3563|      0|        b = id->prefix->binding;
 3564|      0|        if (! b)
  ------------------
  |  Branch (3564:13): [True: 0, False: 0]
  ------------------
 3565|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3566|       |
 3567|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3567:21): [True: 0, False: 0]
  ------------------
 3568|      0|          const XML_Char c = b->uri[j];
 3569|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3569:15): [True: 0, False: 0]
  ------------------
 3570|      0|            return XML_ERROR_NO_MEMORY;
 3571|      0|        }
 3572|       |
 3573|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3574|       |
 3575|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3575:16): [True: 0, False: 0]
  ------------------
 3576|      0|          ;
 3577|       |
 3578|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3579|       |
 3580|      0|        do { /* copies null terminator */
 3581|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3581:15): [True: 0, False: 0]
  ------------------
 3582|      0|            return XML_ERROR_NO_MEMORY;
 3583|      0|        } while (*s++);
  ------------------
  |  Branch (3583:18): [True: 0, False: 0]
  ------------------
 3584|       |
 3585|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3586|       |
 3587|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3588|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3589|       |          */
 3590|      0|          unsigned char step = 0;
 3591|      0|          unsigned long mask = nsAttsSize - 1;
 3592|      0|          j = uriHash & mask; /* index into hash table */
 3593|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3593:18): [True: 0, False: 0]
  ------------------
 3594|       |            /* for speed we compare stored hash values first */
 3595|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3595:17): [True: 0, False: 0]
  ------------------
 3596|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3597|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3598|       |              /* s1 is null terminated, but not s2 */
 3599|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3599:22): [True: 0, False: 0]
  |  Branch (3599:36): [True: 0, False: 0]
  ------------------
 3600|      0|                ;
 3601|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3601:19): [True: 0, False: 0]
  ------------------
 3602|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3603|      0|            }
 3604|      0|            if (! step)
  ------------------
  |  Branch (3604:17): [True: 0, False: 0]
  ------------------
 3605|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  234|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3606|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3606:13): [True: 0, False: 0]
  ------------------
 3607|      0|          }
 3608|      0|        }
 3609|       |
 3610|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3610:13): [True: 0, False: 0]
  ------------------
 3611|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3612|      0|          s = b->prefix->name;
 3613|      0|          do {
 3614|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3614:17): [True: 0, False: 0]
  ------------------
 3615|      0|              return XML_ERROR_NO_MEMORY;
 3616|      0|          } while (*s++);
  ------------------
  |  Branch (3616:20): [True: 0, False: 0]
  ------------------
 3617|      0|        }
 3618|       |
 3619|       |        /* store expanded name in attribute list */
 3620|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3621|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3622|      0|        appAtts[i] = s;
 3623|       |
 3624|       |        /* fill empty slot with new version, uriName and hash value */
 3625|      0|        parser->m_nsAtts[j].version = version;
 3626|      0|        parser->m_nsAtts[j].hash = uriHash;
 3627|      0|        parser->m_nsAtts[j].uriName = s;
 3628|       |
 3629|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3629:13): [True: 0, False: 0]
  ------------------
 3630|      0|          i += 2;
 3631|      0|          break;
 3632|      0|        }
 3633|      0|      } else                     /* not prefixed */
 3634|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3635|      0|    }
 3636|      0|  }
 3637|       |  /* clear flags for the remaining attributes */
 3638|  3.23M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3638:10): [True: 23.6k, False: 3.20M]
  ------------------
 3639|  23.6k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3640|  3.20M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3640:32): [True: 0, False: 3.20M]
  ------------------
 3641|      0|    binding->attId->name[-1] = 0;
 3642|       |
 3643|  3.20M|  if (! parser->m_ns)
  ------------------
  |  Branch (3643:7): [True: 3.20M, False: 0]
  ------------------
 3644|  3.20M|    return XML_ERROR_NONE;
 3645|       |
 3646|       |  /* expand the element type name */
 3647|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3647:7): [True: 0, False: 0]
  ------------------
 3648|      0|    binding = elementType->prefix->binding;
 3649|      0|    if (! binding)
  ------------------
  |  Branch (3649:9): [True: 0, False: 0]
  ------------------
 3650|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3651|      0|    localPart = tagNamePtr->str;
 3652|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3652:12): [True: 0, False: 0]
  ------------------
 3653|      0|      ;
 3654|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3654:14): [True: 0, False: 0]
  ------------------
 3655|      0|    binding = dtd->defaultPrefix.binding;
 3656|      0|    localPart = tagNamePtr->str;
 3657|      0|  } else
 3658|      0|    return XML_ERROR_NONE;
 3659|      0|  prefixLen = 0;
 3660|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3660:7): [True: 0, False: 0]
  |  Branch (3660:32): [True: 0, False: 0]
  ------------------
 3661|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3661:12): [True: 0, False: 0]
  ------------------
 3662|      0|      ; /* prefixLen includes null terminator */
 3663|      0|  }
 3664|      0|  tagNamePtr->localPart = localPart;
 3665|      0|  tagNamePtr->uriLen = binding->uriLen;
 3666|      0|  tagNamePtr->prefix = binding->prefix->name;
 3667|      0|  tagNamePtr->prefixLen = prefixLen;
 3668|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3668:15): [True: 0, False: 0]
  ------------------
 3669|      0|    ; /* i includes null terminator */
 3670|       |
 3671|       |  /* Detect and prevent integer overflow */
 3672|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3672:7): [True: 0, False: 0]
  ------------------
 3673|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3673:10): [True: 0, False: 0]
  ------------------
 3674|      0|    return XML_ERROR_NO_MEMORY;
 3675|      0|  }
 3676|       |
 3677|      0|  n = i + binding->uriLen + prefixLen;
 3678|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3678:7): [True: 0, False: 0]
  ------------------
 3679|      0|    TAG *p;
 3680|       |
 3681|       |    /* Detect and prevent integer overflow */
 3682|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  248|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3682:9): [True: 0, False: 0]
  ------------------
 3683|      0|      return XML_ERROR_NO_MEMORY;
 3684|      0|    }
 3685|       |    /* Detect and prevent integer overflow.
 3686|       |     * The preprocessor guard addresses the "always false" warning
 3687|       |     * from -Wtype-limits on platforms where
 3688|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3689|       |#if UINT_MAX >= SIZE_MAX
 3690|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3691|       |      return XML_ERROR_NO_MEMORY;
 3692|       |    }
 3693|       |#endif
 3694|       |
 3695|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  713|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3696|      0|    if (! uri)
  ------------------
  |  Branch (3696:9): [True: 0, False: 0]
  ------------------
 3697|      0|      return XML_ERROR_NO_MEMORY;
 3698|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  248|      0|#define EXPAND_SPARE 24
  ------------------
 3699|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3700|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3700:34): [True: 0, False: 0]
  ------------------
 3701|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3701:11): [True: 0, False: 0]
  ------------------
 3702|      0|        p->name.str = uri;
 3703|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3704|      0|    binding->uri = uri;
 3705|      0|  }
 3706|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3707|      0|  uri = binding->uri + binding->uriLen;
 3708|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3709|       |  /* we always have a namespace separator between localPart and prefix */
 3710|      0|  if (prefixLen) {
  ------------------
  |  Branch (3710:7): [True: 0, False: 0]
  ------------------
 3711|      0|    uri += i - 1;
 3712|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3713|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3714|      0|  }
 3715|      0|  tagNamePtr->str = binding->uri;
 3716|      0|  return XML_ERROR_NONE;
 3717|      0|}
xmlparse.c:setElementTypePrefix:
 6446|  6.05k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6447|  6.05k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6448|  6.05k|  const XML_Char *name;
 6449|   184k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6449:34): [True: 181k, False: 3.46k]
  ------------------
 6450|   181k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|   181k|#  define XML_T(x) x
  ------------------
  |  Branch (6450:9): [True: 2.58k, False: 178k]
  ------------------
 6451|  2.58k|      PREFIX *prefix;
 6452|  2.58k|      const XML_Char *s;
 6453|   107k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6453:35): [True: 105k, False: 2.58k]
  ------------------
 6454|   105k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  602|   105k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 143, False: 104k]
  |  |  |  Branch (602:35): [True: 0, False: 143]
  |  |  ------------------
  |  |  603|   105k|       ? 0                                                                     \
  |  |  604|   105k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6454:13): [True: 0, False: 105k]
  ------------------
 6455|      0|          return 0;
 6456|   105k|      }
 6457|  2.58k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|  2.58k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 12, False: 2.57k]
  |  |  |  Branch (602:35): [True: 0, False: 12]
  |  |  ------------------
  |  |  603|  2.58k|       ? 0                                                                     \
  |  |  604|  2.58k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6457:11): [True: 0, False: 2.58k]
  ------------------
 6458|      0|        return 0;
 6459|  2.58k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  595|  2.58k|#define poolStart(pool) ((pool)->start)
  ------------------
 6460|  2.58k|                                sizeof(PREFIX));
 6461|  2.58k|      if (! prefix)
  ------------------
  |  Branch (6461:11): [True: 0, False: 2.58k]
  ------------------
 6462|      0|        return 0;
 6463|  2.58k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|  2.58k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6463:11): [True: 2.05k, False: 536]
  ------------------
 6464|  2.05k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  2.05k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6465|    536|      else
 6466|    536|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    536|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6467|  2.58k|      elementType->prefix = prefix;
 6468|  2.58k|      break;
 6469|  2.58k|    }
 6470|   181k|  }
 6471|  6.05k|  return 1;
 6472|  6.05k|}
xmlparse.c:freeBindings:
 3223|  18.6k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3224|  18.6k|  while (bindings) {
  ------------------
  |  Branch (3224:10): [True: 0, False: 18.6k]
  ------------------
 3225|      0|    BINDING *b = bindings;
 3226|       |
 3227|       |    /* m_startNamespaceDeclHandler will have been called for this
 3228|       |     * binding in addBindings(), so call the end handler now.
 3229|       |     */
 3230|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3230:9): [True: 0, False: 0]
  ------------------
 3231|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3232|       |
 3233|      0|    bindings = bindings->nextTagBinding;
 3234|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3235|      0|    parser->m_freeBindingList = b;
 3236|      0|    b->prefix->binding = b->prevPrefixBinding;
 3237|      0|  }
 3238|  18.6k|}
xmlparse.c:epilogProcessor:
 5646|    140|                const char **nextPtr) {
 5647|    140|  parser->m_processor = epilogProcessor;
 5648|    140|  parser->m_eventPtr = s;
 5649|  1.18k|  for (;;) {
 5650|  1.18k|    const char *next = NULL;
 5651|  1.18k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.18k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.18k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5652|  1.18k|#ifdef XML_DTD
 5653|  1.18k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5653:9): [True: 0, False: 1.18k]
  ------------------
 5654|  1.18k|                                  XML_ACCOUNT_DIRECT)) {
 5655|      0|      accountingOnAbort(parser);
 5656|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5657|      0|    }
 5658|  1.18k|#endif
 5659|  1.18k|    parser->m_eventEndPtr = next;
 5660|  1.18k|    switch (tok) {
 5661|       |    /* report partial linebreak - it might be the last token */
 5662|      1|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      1|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5662:5): [True: 1, False: 1.18k]
  ------------------
 5663|      1|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5663:11): [True: 0, False: 1]
  ------------------
 5664|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5665|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5665:13): [True: 0, False: 0]
  ------------------
 5666|      0|          return XML_ERROR_ABORTED;
 5667|      0|      }
 5668|      1|      *nextPtr = next;
 5669|      1|      return XML_ERROR_NONE;
 5670|     67|    case XML_TOK_NONE:
  ------------------
  |  |   51|     67|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5670:5): [True: 67, False: 1.11k]
  ------------------
 5671|     67|      *nextPtr = s;
 5672|     67|      return XML_ERROR_NONE;
 5673|    321|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    321|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5673:5): [True: 321, False: 861]
  ------------------
 5674|    321|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5674:11): [True: 0, False: 321]
  ------------------
 5675|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5676|    321|      break;
 5677|    515|    case XML_TOK_PI:
  ------------------
  |  |   76|    515|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5677:5): [True: 515, False: 667]
  ------------------
 5678|    515|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5678:11): [True: 0, False: 515]
  ------------------
 5679|      0|        return XML_ERROR_NO_MEMORY;
 5680|    515|      break;
 5681|    515|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    206|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5681:5): [True: 206, False: 976]
  ------------------
 5682|    206|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5682:11): [True: 0, False: 206]
  ------------------
 5683|      0|        return XML_ERROR_NO_MEMORY;
 5684|    206|      break;
 5685|    206|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5685:5): [True: 18, False: 1.16k]
  ------------------
 5686|     18|      parser->m_eventPtr = next;
 5687|     18|      return XML_ERROR_INVALID_TOKEN;
 5688|      2|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5688:5): [True: 2, False: 1.18k]
  ------------------
 5689|      2|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5689:11): [True: 2, False: 0]
  ------------------
 5690|      2|        *nextPtr = s;
 5691|      2|        return XML_ERROR_NONE;
 5692|      2|      }
 5693|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5694|      1|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5694:5): [True: 1, False: 1.18k]
  ------------------
 5695|      1|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5695:11): [True: 1, False: 0]
  ------------------
 5696|      1|        *nextPtr = s;
 5697|      1|        return XML_ERROR_NONE;
 5698|      1|      }
 5699|      0|      return XML_ERROR_PARTIAL_CHAR;
 5700|     51|    default:
  ------------------
  |  Branch (5700:5): [True: 51, False: 1.13k]
  ------------------
 5701|     51|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5702|  1.18k|    }
 5703|  1.04k|    parser->m_eventPtr = s = next;
 5704|  1.04k|    switch (parser->m_parsingStatus.parsing) {
 5705|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5705:5): [True: 0, False: 1.04k]
  ------------------
 5706|      0|      *nextPtr = next;
 5707|      0|      return XML_ERROR_NONE;
 5708|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5708:5): [True: 0, False: 1.04k]
  ------------------
 5709|      0|      return XML_ERROR_ABORTED;
 5710|  1.04k|    default:;
  ------------------
  |  Branch (5710:5): [True: 1.04k, False: 0]
  ------------------
 5711|  1.04k|    }
 5712|  1.04k|  }
 5713|    140|}
xmlparse.c:doCdataSection:
 4026|  2.60k|               enum XML_Account account) {
 4027|  2.60k|  const char *s = *startPtr;
 4028|  2.60k|  const char **eventPP;
 4029|  2.60k|  const char **eventEndPP;
 4030|  2.60k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4030:7): [True: 1.59k, False: 1.00k]
  ------------------
 4031|  1.59k|    eventPP = &parser->m_eventPtr;
 4032|  1.59k|    *eventPP = s;
 4033|  1.59k|    eventEndPP = &parser->m_eventEndPtr;
 4034|  1.59k|  } else {
 4035|  1.00k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4036|  1.00k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4037|  1.00k|  }
 4038|  2.60k|  *eventPP = s;
 4039|  2.60k|  *startPtr = NULL;
 4040|       |
 4041|   118k|  for (;;) {
 4042|   118k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4043|   118k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|   118k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   118k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4044|   118k|#ifdef XML_DTD
 4045|   118k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4045:9): [True: 1, False: 118k]
  ------------------
 4046|      1|      accountingOnAbort(parser);
 4047|      1|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4048|      1|    }
 4049|       |#else
 4050|       |    UNUSED_P(account);
 4051|       |#endif
 4052|   118k|    *eventEndPP = next;
 4053|   118k|    switch (tok) {
 4054|  1.72k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  1.72k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4054:5): [True: 1.72k, False: 116k]
  ------------------
 4055|  1.72k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4055:11): [True: 0, False: 1.72k]
  ------------------
 4056|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4057|       |      /* BEGIN disabled code */
 4058|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4059|  1.72k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4059:16): [Folded - Ignored]
  |  Branch (4059:23): [True: 0, False: 0]
  ------------------
 4060|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4061|      0|                                       0);
 4062|       |      /* END disabled code */
 4063|  1.72k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4063:16): [True: 0, False: 1.72k]
  ------------------
 4064|      0|        reportDefault(parser, enc, s, next);
 4065|  1.72k|      *startPtr = next;
 4066|  1.72k|      *nextPtr = next;
 4067|  1.72k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4067:11): [True: 0, False: 1.72k]
  ------------------
 4068|      0|        return XML_ERROR_ABORTED;
 4069|  1.72k|      else
 4070|  1.72k|        return XML_ERROR_NONE;
 4071|  43.3k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  43.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4071:5): [True: 43.3k, False: 75.1k]
  ------------------
 4072|  43.3k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4072:11): [True: 0, False: 43.3k]
  ------------------
 4073|      0|        XML_Char c = 0xA;
 4074|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4075|  43.3k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4075:18): [True: 0, False: 43.3k]
  ------------------
 4076|      0|        reportDefault(parser, enc, s, next);
 4077|  43.3k|      break;
 4078|  72.5k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  72.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4078:5): [True: 72.5k, False: 45.9k]
  ------------------
 4079|  72.5k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4080|  72.5k|      if (charDataHandler) {
  ------------------
  |  Branch (4080:11): [True: 0, False: 72.5k]
  ------------------
 4081|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4082|      0|          for (;;) {
 4083|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4084|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4085|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4086|      0|            *eventEndPP = next;
 4087|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4088|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4089|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4089:17): [True: 0, False: 0]
  ------------------
 4090|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4090:20): [True: 0, False: 0]
  ------------------
 4091|      0|              break;
 4092|      0|            *eventPP = s;
 4093|      0|          }
 4094|      0|        } else
 4095|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4096|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4097|  72.5k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4097:18): [True: 0, False: 72.5k]
  ------------------
 4098|      0|        reportDefault(parser, enc, s, next);
 4099|  72.5k|    } break;
 4100|    163|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    163|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4100:5): [True: 163, False: 118k]
  ------------------
 4101|    163|      *eventPP = next;
 4102|    163|      return XML_ERROR_INVALID_TOKEN;
 4103|    149|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    149|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4103:5): [True: 149, False: 118k]
  ------------------
 4104|    149|      if (haveMore) {
  ------------------
  |  Branch (4104:11): [True: 149, False: 0]
  ------------------
 4105|    149|        *nextPtr = s;
 4106|    149|        return XML_ERROR_NONE;
 4107|    149|      }
 4108|      0|      return XML_ERROR_PARTIAL_CHAR;
 4109|     81|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4109:5): [True: 81, False: 118k]
  ------------------
 4110|    565|    case XML_TOK_NONE:
  ------------------
  |  |   51|    565|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4110:5): [True: 484, False: 117k]
  ------------------
 4111|    565|      if (haveMore) {
  ------------------
  |  Branch (4111:11): [True: 484, False: 81]
  ------------------
 4112|    484|        *nextPtr = s;
 4113|    484|        return XML_ERROR_NONE;
 4114|    484|      }
 4115|     81|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4116|      0|    default:
  ------------------
  |  Branch (4116:5): [True: 0, False: 118k]
  ------------------
 4117|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4118|       |       * explicit case, so this default case will never be executed.
 4119|       |       * We retain it as a safety net and exclude it from the coverage
 4120|       |       * statistics.
 4121|       |       *
 4122|       |       * LCOV_EXCL_START
 4123|       |       */
 4124|      0|      *eventPP = next;
 4125|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4126|       |      /* LCOV_EXCL_STOP */
 4127|   118k|    }
 4128|       |
 4129|   115k|    *eventPP = s = next;
 4130|   115k|    switch (parser->m_parsingStatus.parsing) {
 4131|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4131:5): [True: 0, False: 115k]
  ------------------
 4132|      0|      *nextPtr = next;
 4133|      0|      return XML_ERROR_NONE;
 4134|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4134:5): [True: 0, False: 115k]
  ------------------
 4135|      0|      return XML_ERROR_ABORTED;
 4136|   115k|    default:;
  ------------------
  |  Branch (4136:5): [True: 115k, False: 0]
  ------------------
 4137|   115k|    }
 4138|   115k|  }
 4139|       |  /* not reached */
 4140|  2.60k|}
xmlparse.c:storeRawNames:
 2571|  7.25k|storeRawNames(XML_Parser parser) {
 2572|  7.25k|  TAG *tag = parser->m_tagStack;
 2573|  1.27M|  while (tag) {
  ------------------
  |  Branch (2573:10): [True: 1.27M, False: 7.25k]
  ------------------
 2574|  1.27M|    int bufSize;
 2575|  1.27M|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2576|  1.27M|    size_t rawNameLen;
 2577|  1.27M|    char *rawNameBuf = tag->buf + nameLen;
 2578|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2579|       |       at the first entry that has already been copied; everything
 2580|       |       below it in the stack is already been accounted for in a
 2581|       |       previous call to this function.
 2582|       |    */
 2583|  1.27M|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2583:9): [True: 0, False: 1.27M]
  ------------------
 2584|      0|      break;
 2585|       |    /* For re-use purposes we need to ensure that the
 2586|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2587|       |    */
 2588|  1.27M|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  196|  1.27M|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2589|       |    /* Detect and prevent integer overflow. */
 2590|  1.27M|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2590:9): [True: 0, False: 1.27M]
  ------------------
 2591|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2592|  1.27M|    bufSize = nameLen + (int)rawNameLen;
 2593|  1.27M|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2593:9): [True: 1.03k, False: 1.26M]
  ------------------
 2594|  1.03k|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|  1.03k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2595|  1.03k|      if (temp == NULL)
  ------------------
  |  Branch (2595:11): [True: 0, False: 1.03k]
  ------------------
 2596|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2597|       |      /* if tag->name.str points to tag->buf (only when namespace
 2598|       |         processing is off) then we have to update it
 2599|       |      */
 2600|  1.03k|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2600:11): [True: 1.03k, False: 0]
  ------------------
 2601|  1.03k|        tag->name.str = (XML_Char *)temp;
 2602|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2603|       |         then update it as well, since it will always point into tag->buf
 2604|       |      */
 2605|  1.03k|      if (tag->name.localPart)
  ------------------
  |  Branch (2605:11): [True: 0, False: 1.03k]
  ------------------
 2606|      0|        tag->name.localPart
 2607|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2608|  1.03k|      tag->buf = temp;
 2609|  1.03k|      tag->bufEnd = temp + bufSize;
 2610|  1.03k|      rawNameBuf = temp + nameLen;
 2611|  1.03k|    }
 2612|  1.27M|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2613|  1.27M|    tag->rawName = rawNameBuf;
 2614|  1.27M|    tag = tag->parent;
 2615|  1.27M|  }
 2616|  7.25k|  return XML_TRUE;
  ------------------
  |  |   55|  7.25k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2617|  7.25k|}
xmlparse.c:getElementType:
 7614|  10.8k|               const char *end) {
 7615|  10.8k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7616|  10.8k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7617|  10.8k|  ELEMENT_TYPE *ret;
 7618|       |
 7619|  10.8k|  if (! name)
  ------------------
  |  Branch (7619:7): [True: 0, False: 10.8k]
  ------------------
 7620|      0|    return NULL;
 7621|  10.8k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7622|  10.8k|                               sizeof(ELEMENT_TYPE));
 7623|  10.8k|  if (! ret)
  ------------------
  |  Branch (7623:7): [True: 0, False: 10.8k]
  ------------------
 7624|      0|    return NULL;
 7625|  10.8k|  if (ret->name != name)
  ------------------
  |  Branch (7625:7): [True: 4.82k, False: 6.05k]
  ------------------
 7626|  4.82k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  4.82k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7627|  6.05k|  else {
 7628|  6.05k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  6.05k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7629|  6.05k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7629:9): [True: 0, False: 6.05k]
  ------------------
 7630|      0|      return NULL;
 7631|  6.05k|  }
 7632|  10.8k|  return ret;
 7633|  10.8k|}
xmlparse.c:getAttributeId:
 6476|  68.1k|               const char *end) {
 6477|  68.1k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6478|  68.1k|  ATTRIBUTE_ID *id;
 6479|  68.1k|  const XML_Char *name;
 6480|  68.1k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|  68.1k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 583, False: 67.5k]
  |  |  |  Branch (602:35): [True: 0, False: 583]
  |  |  ------------------
  |  |  603|  68.1k|       ? 0                                                                     \
  |  |  604|  68.1k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6480:7): [True: 0, False: 68.1k]
  ------------------
 6481|      0|    return NULL;
 6482|  68.1k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6483|  68.1k|  if (! name)
  ------------------
  |  Branch (6483:7): [True: 0, False: 68.1k]
  ------------------
 6484|      0|    return NULL;
 6485|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6486|  68.1k|  ++name;
 6487|  68.1k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6488|  68.1k|                              sizeof(ATTRIBUTE_ID));
 6489|  68.1k|  if (! id)
  ------------------
  |  Branch (6489:7): [True: 0, False: 68.1k]
  ------------------
 6490|      0|    return NULL;
 6491|  68.1k|  if (id->name != name)
  ------------------
  |  Branch (6491:7): [True: 61.0k, False: 7.04k]
  ------------------
 6492|  61.0k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  61.0k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6493|  7.04k|  else {
 6494|  7.04k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  7.04k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6495|  7.04k|    if (! parser->m_ns)
  ------------------
  |  Branch (6495:9): [True: 7.04k, False: 0]
  ------------------
 6496|  7.04k|      ;
 6497|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6497:14): [True: 0, False: 0]
  |  Branch (6497:43): [True: 0, False: 0]
  ------------------
 6498|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:17): [True: 0, False: 0]
  |  Branch (6498:46): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  ------------------
 6500|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:18): [True: 0, False: 0]
  |  Branch (6500:44): [True: 0, False: 0]
  ------------------
 6501|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:11): [True: 0, False: 0]
  ------------------
 6502|      0|        id->prefix = &dtd->defaultPrefix;
 6503|      0|      else
 6504|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6505|      0|                                      sizeof(PREFIX));
 6506|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6507|      0|    } else {
 6508|      0|      int i;
 6509|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6509:19): [True: 0, False: 0]
  ------------------
 6510|       |        /* attributes without prefix are *not* in the default namespace */
 6511|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6511:13): [True: 0, False: 0]
  ------------------
 6512|      0|          int j;
 6513|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6513:23): [True: 0, False: 0]
  ------------------
 6514|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6514:17): [True: 0, False: 0]
  ------------------
 6515|      0|              return NULL;
 6516|      0|          }
 6517|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6517:15): [True: 0, False: 0]
  ------------------
 6518|      0|            return NULL;
 6519|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6520|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6521|      0|          if (! id->prefix)
  ------------------
  |  Branch (6521:15): [True: 0, False: 0]
  ------------------
 6522|      0|            return NULL;
 6523|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6523:15): [True: 0, False: 0]
  ------------------
 6524|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6525|      0|          else
 6526|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6527|      0|          break;
 6528|      0|        }
 6529|      0|      }
 6530|      0|    }
 6531|  7.04k|  }
 6532|  68.1k|  return id;
 6533|  68.1k|}
xmlparse.c:poolAppend:
 7220|  50.6M|           const char *end) {
 7221|  50.6M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7221:7): [True: 28.7k, False: 50.6M]
  |  Branch (7221:22): [True: 0, False: 28.7k]
  ------------------
 7222|      0|    return NULL;
 7223|  50.7M|  for (;;) {
 7224|  50.7M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|  50.7M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  50.7M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7225|  50.7M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7226|  50.7M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7226:9): [True: 50.6M, False: 14.9k]
  ------------------
 7227|  50.7M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7227:12): [True: 0, False: 14.9k]
  ------------------
 7228|  50.6M|      break;
 7229|  14.9k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7229:9): [True: 0, False: 14.9k]
  ------------------
 7230|      0|      return NULL;
 7231|  14.9k|  }
 7232|  50.6M|  return pool->start;
 7233|  50.6M|}
xmlparse.c:defineAttribute:
 6386|  42.0k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6387|  42.0k|  DEFAULT_ATTRIBUTE *att;
 6388|  42.0k|  if (value || isId) {
  ------------------
  |  Branch (6388:7): [True: 24.2k, False: 17.8k]
  |  Branch (6388:16): [True: 1.23k, False: 16.6k]
  ------------------
 6389|       |    /* The handling of default attributes gets messed up if we have
 6390|       |       a default which duplicates a non-default. */
 6391|  25.4k|    int i;
 6392|   112k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6392:17): [True: 106k, False: 6.47k]
  ------------------
 6393|   106k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6393:11): [True: 18.9k, False: 87.5k]
  ------------------
 6394|  18.9k|        return 1;
 6395|  6.47k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6395:9): [True: 501, False: 5.97k]
  |  Branch (6395:17): [True: 300, False: 201]
  |  Branch (6395:34): [True: 300, False: 0]
  ------------------
 6396|    300|      type->idAtt = attId;
 6397|  6.47k|  }
 6398|  23.0k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6398:7): [True: 4.89k, False: 18.1k]
  ------------------
 6399|  4.89k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6399:9): [True: 4.44k, False: 444]
  ------------------
 6400|  4.44k|      type->allocDefaultAtts = 8;
 6401|  4.44k|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  713|  4.44k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6402|  4.44k|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6403|  4.44k|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6403:11): [True: 0, False: 4.44k]
  ------------------
 6404|      0|        type->allocDefaultAtts = 0;
 6405|      0|        return 0;
 6406|      0|      }
 6407|  4.44k|    } else {
 6408|    444|      DEFAULT_ATTRIBUTE *temp;
 6409|       |
 6410|       |      /* Detect and prevent integer overflow */
 6411|    444|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6411:11): [True: 0, False: 444]
  ------------------
 6412|      0|        return 0;
 6413|      0|      }
 6414|       |
 6415|    444|      int count = type->allocDefaultAtts * 2;
 6416|       |
 6417|       |      /* Detect and prevent integer overflow.
 6418|       |       * The preprocessor guard addresses the "always false" warning
 6419|       |       * from -Wtype-limits on platforms where
 6420|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6421|       |#if UINT_MAX >= SIZE_MAX
 6422|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6423|       |        return 0;
 6424|       |      }
 6425|       |#endif
 6426|       |
 6427|    444|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  714|    444|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6428|    444|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6429|    444|      if (temp == NULL)
  ------------------
  |  Branch (6429:11): [True: 0, False: 444]
  ------------------
 6430|      0|        return 0;
 6431|    444|      type->allocDefaultAtts = count;
 6432|    444|      type->defaultAtts = temp;
 6433|    444|    }
 6434|  4.89k|  }
 6435|  23.0k|  att = type->defaultAtts + type->nDefaultAtts;
 6436|  23.0k|  att->id = attId;
 6437|  23.0k|  att->value = value;
 6438|  23.0k|  att->isCdata = isCdata;
 6439|  23.0k|  if (! isCdata)
  ------------------
  |  Branch (6439:7): [True: 22.9k, False: 123]
  ------------------
 6440|  22.9k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  22.9k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6441|  23.0k|  type->nDefaultAtts += 1;
 6442|  23.0k|  return 1;
 6443|  23.0k|}
xmlparse.c:poolGrow:
 7321|  59.0k|poolGrow(STRING_POOL *pool) {
 7322|  59.0k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7322:7): [True: 27.2k, False: 31.7k]
  ------------------
 7323|  27.2k|    if (pool->start == 0) {
  ------------------
  |  Branch (7323:9): [True: 23.3k, False: 3.90k]
  ------------------
 7324|  23.3k|      pool->blocks = pool->freeBlocks;
 7325|  23.3k|      pool->freeBlocks = pool->freeBlocks->next;
 7326|  23.3k|      pool->blocks->next = NULL;
 7327|  23.3k|      pool->start = pool->blocks->s;
 7328|  23.3k|      pool->end = pool->start + pool->blocks->size;
 7329|  23.3k|      pool->ptr = pool->start;
 7330|  23.3k|      return XML_TRUE;
  ------------------
  |  |   55|  23.3k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7331|  23.3k|    }
 7332|  3.90k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7332:9): [True: 3.74k, False: 156]
  ------------------
 7333|  3.74k|      BLOCK *tem = pool->freeBlocks->next;
 7334|  3.74k|      pool->freeBlocks->next = pool->blocks;
 7335|  3.74k|      pool->blocks = pool->freeBlocks;
 7336|  3.74k|      pool->freeBlocks = tem;
 7337|  3.74k|      memcpy(pool->blocks->s, pool->start,
 7338|  3.74k|             (pool->end - pool->start) * sizeof(XML_Char));
 7339|  3.74k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7340|  3.74k|      pool->start = pool->blocks->s;
 7341|  3.74k|      pool->end = pool->start + pool->blocks->size;
 7342|  3.74k|      return XML_TRUE;
  ------------------
  |  |   55|  3.74k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7343|  3.74k|    }
 7344|  3.90k|  }
 7345|  31.9k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7345:7): [True: 13.9k, False: 18.0k]
  |  Branch (7345:23): [True: 9.59k, False: 4.31k]
  ------------------
 7346|  9.59k|    BLOCK *temp;
 7347|  9.59k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7348|  9.59k|    size_t bytesToAllocate;
 7349|       |
 7350|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7351|       |             to avoid dangling pointers: */
 7352|  9.59k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7353|       |
 7354|  9.59k|    if (blockSize < 0) {
  ------------------
  |  Branch (7354:9): [True: 0, False: 9.59k]
  ------------------
 7355|       |      /* This condition traps a situation where either more than
 7356|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7357|       |       * readily testable, since it is unlikely that an average
 7358|       |       * machine will have that much memory, so we exclude it from the
 7359|       |       * coverage statistics.
 7360|       |       */
 7361|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7362|      0|    }
 7363|       |
 7364|  9.59k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7365|  9.59k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7365:9): [True: 0, False: 9.59k]
  ------------------
 7366|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7367|       |
 7368|  9.59k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7369|  9.59k|                                           (unsigned)bytesToAllocate);
 7370|  9.59k|    if (temp == NULL)
  ------------------
  |  Branch (7370:9): [True: 0, False: 9.59k]
  ------------------
 7371|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7372|  9.59k|    pool->blocks = temp;
 7373|  9.59k|    pool->blocks->size = blockSize;
 7374|  9.59k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7375|  9.59k|    pool->start = pool->blocks->s;
 7376|  9.59k|    pool->end = pool->start + blockSize;
 7377|  22.3k|  } else {
 7378|  22.3k|    BLOCK *tem;
 7379|  22.3k|    int blockSize = (int)(pool->end - pool->start);
 7380|  22.3k|    size_t bytesToAllocate;
 7381|       |
 7382|  22.3k|    if (blockSize < 0) {
  ------------------
  |  Branch (7382:9): [True: 0, False: 22.3k]
  ------------------
 7383|       |      /* This condition traps a situation where either more than
 7384|       |       * INT_MAX bytes have already been allocated (which is prevented
 7385|       |       * by various pieces of program logic, not least this one, never
 7386|       |       * mind the unlikelihood of actually having that much memory) or
 7387|       |       * the pool control fields have been corrupted (which could
 7388|       |       * conceivably happen in an extremely buggy user handler
 7389|       |       * function).  Either way it isn't readily testable, so we
 7390|       |       * exclude it from the coverage statistics.
 7391|       |       */
 7392|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7393|      0|    }
 7394|       |
 7395|  22.3k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  245|  22.3k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7395:9): [True: 21.9k, False: 360]
  ------------------
 7396|  21.9k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  245|  21.9k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7397|    360|    else {
 7398|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7399|    360|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7399:11): [True: 0, False: 360]
  ------------------
 7400|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7401|      0|      }
 7402|    360|      blockSize *= 2;
 7403|    360|    }
 7404|       |
 7405|  22.3k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7406|  22.3k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7406:9): [True: 0, False: 22.3k]
  ------------------
 7407|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7408|       |
 7409|  22.3k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7410|  22.3k|    if (! tem)
  ------------------
  |  Branch (7410:9): [True: 0, False: 22.3k]
  ------------------
 7411|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7412|  22.3k|    tem->size = blockSize;
 7413|  22.3k|    tem->next = pool->blocks;
 7414|  22.3k|    pool->blocks = tem;
 7415|  22.3k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7415:9): [True: 3.63k, False: 18.7k]
  ------------------
 7416|  3.63k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7417|  22.3k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7418|  22.3k|    pool->start = tem->s;
 7419|  22.3k|    pool->end = tem->s + blockSize;
 7420|  22.3k|  }
 7421|  31.9k|  return XML_TRUE;
  ------------------
  |  |   55|  31.9k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7422|  31.9k|}
xmlparse.c:poolBytesToAllocateFor:
 7293|  31.9k|poolBytesToAllocateFor(int blockSize) {
 7294|       |  /* Unprotected math would be:
 7295|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7296|       |  **
 7297|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7298|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7299|       |  ** on top has no chance of making us accept a small non-negative number
 7300|       |  */
 7301|  31.9k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7302|       |
 7303|  31.9k|  if (blockSize <= 0)
  ------------------
  |  Branch (7303:7): [True: 0, False: 31.9k]
  ------------------
 7304|      0|    return 0;
 7305|       |
 7306|  31.9k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7306:7): [True: 0, False: 31.9k]
  ------------------
 7307|      0|    return 0;
 7308|       |
 7309|  31.9k|  {
 7310|  31.9k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7311|  31.9k|    const int bytesToAllocate
 7312|  31.9k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7313|  31.9k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7313:9): [True: 0, False: 31.9k]
  ------------------
 7314|      0|      return 0;
 7315|       |
 7316|  31.9k|    return (size_t)bytesToAllocate;
 7317|  31.9k|  }
 7318|  31.9k|}
xmlparse.c:storeAttributeValue:
 5871|  38.2k|                    enum XML_Account account) {
 5872|  38.2k|  enum XML_Error result
 5873|  38.2k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5874|  38.2k|  if (result)
  ------------------
  |  Branch (5874:7): [True: 229, False: 38.0k]
  ------------------
 5875|    229|    return result;
 5876|  38.0k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  596|  62.7k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (596:26): [True: 16.8k, False: 7.89k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  598|  16.8k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5876:7): [True: 24.7k, False: 13.2k]
  |  Branch (5876:40): [True: 712, False: 16.1k]
  ------------------
 5877|    712|    poolChop(pool);
  ------------------
  |  |  597|    712|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5878|  38.0k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  602|  38.0k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 920, False: 37.1k]
  |  |  |  Branch (602:35): [True: 0, False: 920]
  |  |  ------------------
  |  |  603|  38.0k|       ? 0                                                                     \
  |  |  604|  38.0k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5878:7): [True: 0, False: 38.0k]
  ------------------
 5879|      0|    return XML_ERROR_NO_MEMORY;
 5880|  38.0k|  return XML_ERROR_NONE;
 5881|  38.0k|}
xmlparse.c:appendAttributeValue:
 5886|   354k|                     enum XML_Account account) {
 5887|   354k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5888|       |#ifndef XML_DTD
 5889|       |  UNUSED_P(account);
 5890|       |#endif
 5891|       |
 5892|   299M|  for (;;) {
 5893|   299M|    const char *next
 5894|   299M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5895|   299M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|   299M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|   299M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5896|   299M|#ifdef XML_DTD
 5897|   299M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5897:9): [True: 21, False: 299M]
  ------------------
 5898|     21|      accountingOnAbort(parser);
 5899|     21|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5900|     21|    }
 5901|   299M|#endif
 5902|   299M|    switch (tok) {
 5903|   353k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   353k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5903:5): [True: 353k, False: 299M]
  ------------------
 5904|   353k|      return XML_ERROR_NONE;
 5905|      8|    case XML_TOK_INVALID:
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5905:5): [True: 8, False: 299M]
  ------------------
 5906|      8|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5906:11): [True: 5, False: 3]
  ------------------
 5907|      5|        parser->m_eventPtr = next;
 5908|      8|      return XML_ERROR_INVALID_TOKEN;
 5909|      3|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5909:5): [True: 3, False: 299M]
  ------------------
 5910|      3|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5910:11): [True: 2, False: 1]
  ------------------
 5911|      2|        parser->m_eventPtr = ptr;
 5912|      3|      return XML_ERROR_INVALID_TOKEN;
 5913|  7.87k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  7.87k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5913:5): [True: 7.87k, False: 299M]
  ------------------
 5914|  7.87k|      XML_Char buf[XML_ENCODE_MAX];
 5915|  7.87k|      int i;
 5916|  7.87k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  7.87k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5917|  7.87k|      if (n < 0) {
  ------------------
  |  Branch (5917:11): [True: 42, False: 7.83k]
  ------------------
 5918|     42|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5918:13): [True: 41, False: 1]
  ------------------
 5919|     41|          parser->m_eventPtr = ptr;
 5920|     42|        return XML_ERROR_BAD_CHAR_REF;
 5921|     42|      }
 5922|  7.83k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5922:11): [True: 1.03k, False: 6.80k]
  |  Branch (5922:24): [True: 767, False: 265]
  ------------------
 5923|  7.83k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|    767|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|    570|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5923:15): [True: 197, False: 570]
  |  Branch (5923:40): [True: 241, False: 329]
  ------------------
 5924|    438|        break;
 5925|  7.39k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  7.39k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5926|       |      /* The XmlEncode() functions can never return 0 here.  That
 5927|       |       * error return happens if the code point passed in is either
 5928|       |       * negative or greater than or equal to 0x110000.  The
 5929|       |       * XmlCharRefNumber() functions will all return a number
 5930|       |       * strictly less than 0x110000 or a negative value if an error
 5931|       |       * occurred.  The negative value is intercepted above, so
 5932|       |       * XmlEncode() is never passed a value it might return an
 5933|       |       * error for.
 5934|       |       */
 5935|  21.8k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5935:19): [True: 14.4k, False: 7.39k]
  ------------------
 5936|  14.4k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  602|  14.4k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 345, False: 14.0k]
  |  |  |  Branch (602:35): [True: 0, False: 345]
  |  |  ------------------
  |  |  603|  14.4k|       ? 0                                                                     \
  |  |  604|  14.4k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5936:13): [True: 0, False: 14.4k]
  ------------------
 5937|      0|          return XML_ERROR_NO_MEMORY;
 5938|  14.4k|      }
 5939|  7.39k|    } break;
 5940|  49.2M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  49.2M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5940:5): [True: 49.2M, False: 250M]
  ------------------
 5941|  49.2M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5941:11): [True: 0, False: 49.2M]
  ------------------
 5942|      0|        return XML_ERROR_NO_MEMORY;
 5943|  49.2M|      break;
 5944|  49.2M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|    895|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5944:5): [True: 895, False: 299M]
  ------------------
 5945|    895|      next = ptr + enc->minBytesPerChar;
 5946|       |      /* fall through */
 5947|  43.1M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  43.1M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5947:5): [True: 43.1M, False: 256M]
  ------------------
 5948|   250M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   250M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5948:5): [True: 206M, False: 93.0M]
  ------------------
 5949|   250M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|  97.4k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|  85.1k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5949:11): [True: 97.4k, False: 249M]
  |  Branch (5949:25): [True: 12.3k, False: 85.1k]
  |  Branch (5949:50): [True: 37.0k, False: 48.1k]
  ------------------
 5950|  49.3k|        break;
 5951|   250M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  602|   250M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 1.96k, False: 250M]
  |  |  |  Branch (602:35): [True: 0, False: 1.96k]
  |  |  ------------------
  |  |  603|   250M|       ? 0                                                                     \
  |  |  604|   250M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5951:11): [True: 0, False: 250M]
  ------------------
 5952|      0|        return XML_ERROR_NO_MEMORY;
 5953|   250M|      break;
 5954|   250M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   325k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5954:5): [True: 325k, False: 299M]
  ------------------
 5955|   325k|      const XML_Char *name;
 5956|   325k|      ENTITY *entity;
 5957|   325k|      char checkEntityDecl;
 5958|   325k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   325k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5959|   325k|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5960|   325k|      if (ch) {
  ------------------
  |  Branch (5960:11): [True: 1.38k, False: 324k]
  ------------------
 5961|  1.38k|#ifdef XML_DTD
 5962|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5963|       |         *       so there is no amplification and hence recording without
 5964|       |         *       protection. */
 5965|  1.38k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5966|  1.38k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5967|  1.38k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5968|  1.38k|#endif /* XML_DTD */
 5969|  1.38k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  602|  1.38k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 321, False: 1.06k]
  |  |  |  Branch (602:35): [True: 0, False: 321]
  |  |  ------------------
  |  |  603|  1.38k|       ? 0                                                                     \
  |  |  604|  1.38k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5969:13): [True: 0, False: 1.38k]
  ------------------
 5970|      0|          return XML_ERROR_NO_MEMORY;
 5971|  1.38k|        break;
 5972|  1.38k|      }
 5973|   324k|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5974|   324k|                             ptr + enc->minBytesPerChar,
 5975|   324k|                             next - enc->minBytesPerChar);
 5976|   324k|      if (! name)
  ------------------
  |  Branch (5976:11): [True: 0, False: 324k]
  ------------------
 5977|      0|        return XML_ERROR_NO_MEMORY;
 5978|   324k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5979|   324k|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  599|   324k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5980|       |      /* First, determine if a check for an existing declaration is needed;
 5981|       |         if yes, check that the entity exists, and that it is internal.
 5982|       |      */
 5983|   324k|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5983:11): [True: 18.4k, False: 306k]
  ------------------
 5984|  18.4k|        checkEntityDecl =
 5985|  18.4k|#ifdef XML_DTD
 5986|  18.4k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5986:13): [True: 18.4k, False: 0]
  ------------------
 5987|  18.4k|#endif /* XML_DTD */
 5988|  18.4k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5988:13): [True: 18.4k, False: 0]
  |  Branch (5988:14): [True: 194, False: 18.2k]
  ------------------
 5989|  18.4k|                             : ! dtd->hasParamEntityRefs);
 5990|   306k|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5991|   306k|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5991:27): [True: 137k, False: 168k]
  |  Branch (5991:56): [True: 0, False: 168k]
  ------------------
 5992|   324k|      if (checkEntityDecl) {
  ------------------
  |  Branch (5992:11): [True: 155k, False: 168k]
  ------------------
 5993|   155k|        if (! entity)
  ------------------
  |  Branch (5993:13): [True: 147, False: 155k]
  ------------------
 5994|    147|          return XML_ERROR_UNDEFINED_ENTITY;
 5995|   155k|        else if (! entity->is_internal)
  ------------------
  |  Branch (5995:18): [True: 0, False: 155k]
  ------------------
 5996|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5997|   168k|      } else if (! entity) {
  ------------------
  |  Branch (5997:18): [True: 8.41k, False: 160k]
  ------------------
 5998|       |        /* Cannot report skipped entity here - see comments on
 5999|       |           parser->m_skippedEntityHandler.
 6000|       |        if (parser->m_skippedEntityHandler)
 6001|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6002|       |        */
 6003|       |        /* Cannot call the default handler because this would be
 6004|       |           out of sync with the call to the startElementHandler.
 6005|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6006|       |          reportDefault(parser, enc, ptr, next);
 6007|       |        */
 6008|  8.41k|        break;
 6009|  8.41k|      }
 6010|   315k|      if (entity->open) {
  ------------------
  |  Branch (6010:11): [True: 4, False: 315k]
  ------------------
 6011|      4|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6011:13): [True: 0, False: 4]
  ------------------
 6012|       |          /* It does not appear that this line can be executed.
 6013|       |           *
 6014|       |           * The "if (entity->open)" check catches recursive entity
 6015|       |           * definitions.  In order to be called with an open
 6016|       |           * entity, it must have gone through this code before and
 6017|       |           * been through the recursive call to
 6018|       |           * appendAttributeValue() some lines below.  That call
 6019|       |           * sets the local encoding ("enc") to the parser's
 6020|       |           * internal encoding (internal_utf8 or internal_utf16),
 6021|       |           * which can never be the same as the principle encoding.
 6022|       |           * It doesn't appear there is another code path that gets
 6023|       |           * here with entity->open being TRUE.
 6024|       |           *
 6025|       |           * Since it is not certain that this logic is watertight,
 6026|       |           * we keep the line and merely exclude it from coverage
 6027|       |           * tests.
 6028|       |           */
 6029|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6030|      0|        }
 6031|      4|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6032|      4|      }
 6033|   315k|      if (entity->notation) {
  ------------------
  |  Branch (6033:11): [True: 2, False: 315k]
  ------------------
 6034|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6034:13): [True: 1, False: 1]
  ------------------
 6035|      1|          parser->m_eventPtr = ptr;
 6036|      2|        return XML_ERROR_BINARY_ENTITY_REF;
 6037|      2|      }
 6038|   315k|      if (! entity->textPtr) {
  ------------------
  |  Branch (6038:11): [True: 2, False: 315k]
  ------------------
 6039|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6039:13): [True: 1, False: 1]
  ------------------
 6040|      1|          parser->m_eventPtr = ptr;
 6041|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6042|   315k|      } else {
 6043|   315k|        enum XML_Error result;
 6044|   315k|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6045|   315k|        entity->open = XML_TRUE;
  ------------------
  |  |   55|   315k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6046|   315k|#ifdef XML_DTD
 6047|   315k|        entityTrackingOnOpen(parser, entity, __LINE__);
 6048|   315k|#endif
 6049|   315k|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6050|   315k|                                      isCdata, (const char *)entity->textPtr,
 6051|   315k|                                      (const char *)textEnd, pool,
 6052|   315k|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6053|   315k|#ifdef XML_DTD
 6054|   315k|        entityTrackingOnClose(parser, entity, __LINE__);
 6055|   315k|#endif
 6056|   315k|        entity->open = XML_FALSE;
  ------------------
  |  |   56|   315k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6057|   315k|        if (result)
  ------------------
  |  Branch (6057:13): [True: 50, False: 315k]
  ------------------
 6058|     50|          return result;
 6059|   315k|      }
 6060|   315k|    } break;
 6061|   315k|    default:
  ------------------
  |  Branch (6061:5): [True: 0, False: 299M]
  ------------------
 6062|       |      /* The only token returned by XmlAttributeValueTok() that does
 6063|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6064|       |       * Getting that would require an entity name to contain an
 6065|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6066|       |       * tokenisers will have already recognised and rejected such
 6067|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6068|       |       * default case should be retained as a safety net, but the code
 6069|       |       * excluded from coverage tests.
 6070|       |       *
 6071|       |       * LCOV_EXCL_START
 6072|       |       */
 6073|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6073:11): [True: 0, False: 0]
  ------------------
 6074|      0|        parser->m_eventPtr = ptr;
 6075|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6076|       |      /* LCOV_EXCL_STOP */
 6077|   299M|    }
 6078|   299M|    ptr = next;
 6079|   299M|  }
 6080|       |  /* not reached */
 6081|   354k|}
xmlparse.c:storeEntityValue:
 6086|  7.91k|                 enum XML_Account account) {
 6087|  7.91k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6088|  7.91k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6089|  7.91k|  enum XML_Error result = XML_ERROR_NONE;
 6090|  7.91k|#ifdef XML_DTD
 6091|  7.91k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6092|  7.91k|  parser->m_prologState.inEntityValue = 1;
 6093|       |#else
 6094|       |  UNUSED_P(account);
 6095|       |#endif /* XML_DTD */
 6096|       |  /* never return Null for the value argument in EntityDeclHandler,
 6097|       |     since this would indicate an external entity; therefore we
 6098|       |     have to make sure that entityValuePool.start is not null */
 6099|  7.91k|  if (! pool->blocks) {
  ------------------
  |  Branch (6099:7): [True: 2.55k, False: 5.36k]
  ------------------
 6100|  2.55k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6100:9): [True: 0, False: 2.55k]
  ------------------
 6101|      0|      return XML_ERROR_NO_MEMORY;
 6102|  2.55k|  }
 6103|       |
 6104|  3.43M|  for (;;) {
 6105|  3.43M|    const char *next
 6106|  3.43M|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6107|  3.43M|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|  3.43M|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  3.43M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6108|       |
 6109|  3.43M|#ifdef XML_DTD
 6110|  3.43M|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6110:9): [True: 0, False: 3.43M]
  ------------------
 6111|  3.43M|                                  account)) {
 6112|      0|      accountingOnAbort(parser);
 6113|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6114|      0|      goto endEntityValue;
 6115|      0|    }
 6116|  3.43M|#endif
 6117|       |
 6118|  3.43M|    switch (tok) {
 6119|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6119:5): [True: 2, False: 3.43M]
  ------------------
 6120|      2|#ifdef XML_DTD
 6121|      2|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6121:11): [True: 0, False: 2]
  |  Branch (6121:38): [True: 0, False: 2]
  ------------------
 6122|      0|        const XML_Char *name;
 6123|      0|        ENTITY *entity;
 6124|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6125|      0|                               entityTextPtr + enc->minBytesPerChar,
 6126|      0|                               next - enc->minBytesPerChar);
 6127|      0|        if (! name) {
  ------------------
  |  Branch (6127:13): [True: 0, False: 0]
  ------------------
 6128|      0|          result = XML_ERROR_NO_MEMORY;
 6129|      0|          goto endEntityValue;
 6130|      0|        }
 6131|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6132|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6133|      0|        if (! entity) {
  ------------------
  |  Branch (6133:13): [True: 0, False: 0]
  ------------------
 6134|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6135|       |          /* cannot report skipped entity here - see comments on
 6136|       |             parser->m_skippedEntityHandler
 6137|       |          if (parser->m_skippedEntityHandler)
 6138|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6139|       |          */
 6140|      0|          dtd->keepProcessing = dtd->standalone;
 6141|      0|          goto endEntityValue;
 6142|      0|        }
 6143|      0|        if (entity->open) {
  ------------------
  |  Branch (6143:13): [True: 0, False: 0]
  ------------------
 6144|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6144:15): [True: 0, False: 0]
  ------------------
 6145|      0|            parser->m_eventPtr = entityTextPtr;
 6146|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6147|      0|          goto endEntityValue;
 6148|      0|        }
 6149|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6149:13): [True: 0, False: 0]
  ------------------
 6150|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6150:15): [True: 0, False: 0]
  ------------------
 6151|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6152|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6153|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6154|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6154:17): [True: 0, False: 0]
  ------------------
 6155|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6156|      0|                    entity->systemId, entity->publicId)) {
 6157|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6158|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6159|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6160|      0|              goto endEntityValue;
 6161|      0|            }
 6162|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6163|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6164|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6164:17): [True: 0, False: 0]
  ------------------
 6165|      0|              dtd->keepProcessing = dtd->standalone;
 6166|      0|          } else
 6167|      0|            dtd->keepProcessing = dtd->standalone;
 6168|      0|        } else {
 6169|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6170|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6171|      0|          result = storeEntityValue(
 6172|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6173|      0|              (const char *)(entity->textPtr + entity->textLen),
 6174|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6175|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6176|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6177|      0|          if (result)
  ------------------
  |  Branch (6177:15): [True: 0, False: 0]
  ------------------
 6178|      0|            goto endEntityValue;
 6179|      0|        }
 6180|      0|        break;
 6181|      0|      }
 6182|      2|#endif /* XML_DTD */
 6183|       |      /* In the internal subset, PE references are not legal
 6184|       |         within markup declarations, e.g entity values in this case. */
 6185|      2|      parser->m_eventPtr = entityTextPtr;
 6186|      2|      result = XML_ERROR_PARAM_ENTITY_REF;
 6187|      2|      goto endEntityValue;
 6188|  7.83k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  7.83k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6188:5): [True: 7.83k, False: 3.42M]
  ------------------
 6189|  7.83k|      result = XML_ERROR_NONE;
 6190|  7.83k|      goto endEntityValue;
 6191|  18.9k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  18.9k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6191:5): [True: 18.9k, False: 3.41M]
  ------------------
 6192|   684k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   684k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6192:5): [True: 665k, False: 2.77M]
  ------------------
 6193|   684k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6193:11): [True: 0, False: 684k]
  ------------------
 6194|      0|        result = XML_ERROR_NO_MEMORY;
 6195|      0|        goto endEntityValue;
 6196|      0|      }
 6197|   684k|      break;
 6198|   684k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|    992|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6198:5): [True: 992, False: 3.43M]
  ------------------
 6199|    992|      next = entityTextPtr + enc->minBytesPerChar;
 6200|       |      /* fall through */
 6201|  2.74M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  2.74M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6201:5): [True: 2.74M, False: 695k]
  ------------------
 6202|  2.74M|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6202:11): [True: 127, False: 2.74M]
  |  Branch (6202:37): [True: 0, False: 127]
  ------------------
 6203|      0|        result = XML_ERROR_NO_MEMORY;
 6204|      0|        goto endEntityValue;
 6205|      0|      }
 6206|  2.74M|      *(pool->ptr)++ = 0xA;
 6207|  2.74M|      break;
 6208|  2.02k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  2.02k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6208:5): [True: 2.02k, False: 3.43M]
  ------------------
 6209|  2.02k|      XML_Char buf[XML_ENCODE_MAX];
 6210|  2.02k|      int i;
 6211|  2.02k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  2.02k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6212|  2.02k|      if (n < 0) {
  ------------------
  |  Branch (6212:11): [True: 5, False: 2.01k]
  ------------------
 6213|      5|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6213:13): [True: 5, False: 0]
  ------------------
 6214|      5|          parser->m_eventPtr = entityTextPtr;
 6215|      5|        result = XML_ERROR_BAD_CHAR_REF;
 6216|      5|        goto endEntityValue;
 6217|      5|      }
 6218|  2.01k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  2.01k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6219|       |      /* The XmlEncode() functions can never return 0 here.  That
 6220|       |       * error return happens if the code point passed in is either
 6221|       |       * negative or greater than or equal to 0x110000.  The
 6222|       |       * XmlCharRefNumber() functions will all return a number
 6223|       |       * strictly less than 0x110000 or a negative value if an error
 6224|       |       * occurred.  The negative value is intercepted above, so
 6225|       |       * XmlEncode() is never passed a value it might return an
 6226|       |       * error for.
 6227|       |       */
 6228|  6.75k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6228:19): [True: 4.74k, False: 2.01k]
  ------------------
 6229|  4.74k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6229:13): [True: 10, False: 4.73k]
  |  Branch (6229:39): [True: 0, False: 10]
  ------------------
 6230|      0|          result = XML_ERROR_NO_MEMORY;
 6231|      0|          goto endEntityValue;
 6232|      0|        }
 6233|  4.74k|        *(pool->ptr)++ = buf[i];
 6234|  4.74k|      }
 6235|  2.01k|    } break;
 6236|  2.01k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     49|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6236:5): [True: 49, False: 3.43M]
  ------------------
 6237|     49|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6237:11): [True: 49, False: 0]
  ------------------
 6238|     49|        parser->m_eventPtr = entityTextPtr;
 6239|     49|      result = XML_ERROR_INVALID_TOKEN;
 6240|     49|      goto endEntityValue;
 6241|     22|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6241:5): [True: 22, False: 3.43M]
  ------------------
 6242|     22|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6242:11): [True: 22, False: 0]
  ------------------
 6243|     22|        parser->m_eventPtr = next;
 6244|     22|      result = XML_ERROR_INVALID_TOKEN;
 6245|     22|      goto endEntityValue;
 6246|      0|    default:
  ------------------
  |  Branch (6246:5): [True: 0, False: 3.43M]
  ------------------
 6247|       |      /* This default case should be unnecessary -- all the tokens
 6248|       |       * that XmlEntityValueTok() can return have their own explicit
 6249|       |       * cases -- but should be retained for safety.  We do however
 6250|       |       * exclude it from the coverage statistics.
 6251|       |       *
 6252|       |       * LCOV_EXCL_START
 6253|       |       */
 6254|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6254:11): [True: 0, False: 0]
  ------------------
 6255|      0|        parser->m_eventPtr = entityTextPtr;
 6256|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6257|      0|      goto endEntityValue;
 6258|       |      /* LCOV_EXCL_STOP */
 6259|  3.43M|    }
 6260|  3.42M|    entityTextPtr = next;
 6261|  3.42M|  }
 6262|  7.91k|endEntityValue:
 6263|  7.91k|#ifdef XML_DTD
 6264|  7.91k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6265|  7.91k|#endif /* XML_DTD */
 6266|  7.91k|  return result;
 6267|  7.91k|}
xmlparse.c:processInternalEntity:
 5716|   264k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5717|   264k|  const char *textStart, *textEnd;
 5718|   264k|  const char *next;
 5719|   264k|  enum XML_Error result;
 5720|   264k|  OPEN_INTERNAL_ENTITY *openEntity;
 5721|       |
 5722|   264k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5722:7): [True: 262k, False: 1.75k]
  ------------------
 5723|   262k|    openEntity = parser->m_freeInternalEntities;
 5724|   262k|    parser->m_freeInternalEntities = openEntity->next;
 5725|   262k|  } else {
 5726|  1.75k|    openEntity
 5727|  1.75k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  713|  1.75k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5728|  1.75k|    if (! openEntity)
  ------------------
  |  Branch (5728:9): [True: 0, False: 1.75k]
  ------------------
 5729|      0|      return XML_ERROR_NO_MEMORY;
 5730|  1.75k|  }
 5731|   264k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   264k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5732|   264k|#ifdef XML_DTD
 5733|   264k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5734|   264k|#endif
 5735|   264k|  entity->processed = 0;
 5736|   264k|  openEntity->next = parser->m_openInternalEntities;
 5737|   264k|  parser->m_openInternalEntities = openEntity;
 5738|   264k|  openEntity->entity = entity;
 5739|   264k|  openEntity->startTagLevel = parser->m_tagLevel;
 5740|   264k|  openEntity->betweenDecl = betweenDecl;
 5741|   264k|  openEntity->internalEventPtr = NULL;
 5742|   264k|  openEntity->internalEventEndPtr = NULL;
 5743|   264k|  textStart = (const char *)entity->textPtr;
 5744|   264k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5745|       |  /* Set a safe default value in case 'next' does not get set */
 5746|   264k|  next = textStart;
 5747|       |
 5748|   264k|#ifdef XML_DTD
 5749|   264k|  if (entity->is_param) {
  ------------------
  |  Branch (5749:7): [True: 0, False: 264k]
  ------------------
 5750|      0|    int tok
 5751|      0|        = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
  ------------------
  |  |  227|      0|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|      0|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5752|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5753|      0|                      tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
                                    tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5754|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5755|      0|  } else
 5756|   264k|#endif /* XML_DTD */
 5757|   264k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5758|   264k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   264k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5759|   264k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5760|       |
 5761|   264k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5761:7): [True: 263k, False: 825]
  ------------------
 5762|   263k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5762:9): [True: 0, False: 263k]
  |  Branch (5762:28): [True: 0, False: 0]
  ------------------
 5763|      0|      entity->processed = (int)(next - textStart);
 5764|      0|      parser->m_processor = internalEntityProcessor;
 5765|   263k|    } else {
 5766|   263k|#ifdef XML_DTD
 5767|   263k|      entityTrackingOnClose(parser, entity, __LINE__);
 5768|   263k|#endif /* XML_DTD */
 5769|   263k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   263k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5770|   263k|      parser->m_openInternalEntities = openEntity->next;
 5771|       |      /* put openEntity back in list of free instances */
 5772|   263k|      openEntity->next = parser->m_freeInternalEntities;
 5773|   263k|      parser->m_freeInternalEntities = openEntity;
 5774|   263k|    }
 5775|   263k|  }
 5776|   264k|  return result;
 5777|   264k|}
xmlparse.c:entityTrackingOnOpen:
 7827|   580k|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7828|   580k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7829|   580k|  assert(! rootParser->m_parentParser);
 7830|       |
 7831|   580k|  rootParser->m_entity_stats.countEverOpened++;
 7832|   580k|  rootParser->m_entity_stats.currentDepth++;
 7833|   580k|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7833:7): [True: 2.35k, False: 577k]
  ------------------
 7834|   580k|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7835|  2.35k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7836|  2.35k|  }
 7837|       |
 7838|   580k|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7839|   580k|}
xmlparse.c:entityTrackingReportStats:
 7804|  1.15M|                          const char *action, int sourceLine) {
 7805|  1.15M|  assert(! rootParser->m_parentParser);
 7806|  1.15M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7806:7): [True: 1.15M, False: 0]
  ------------------
 7807|  1.15M|    return;
 7808|       |
 7809|       |#  if defined(XML_UNICODE)
 7810|       |  const char *const entityName = "[..]";
 7811|       |#  else
 7812|      0|  const char *const entityName = entity->name;
 7813|      0|#  endif
 7814|       |
 7815|      0|  fprintf(
 7816|      0|      stderr,
 7817|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7818|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7819|      0|      rootParser->m_entity_stats.currentDepth,
 7820|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7821|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7822|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7822:7): [True: 0, False: 0]
  ------------------
 7823|      0|      sourceLine);
 7824|      0|}
xmlparse.c:entityTrackingOnClose:
 7842|   579k|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7843|   579k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7844|   579k|  assert(! rootParser->m_parentParser);
 7845|       |
 7846|   579k|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7847|   579k|  rootParser->m_entity_stats.currentDepth--;
 7848|   579k|}
xmlparse.c:reportProcessingInstruction:
 6292|  13.6k|                            const char *start, const char *end) {
 6293|  13.6k|  const XML_Char *target;
 6294|  13.6k|  XML_Char *data;
 6295|  13.6k|  const char *tem;
 6296|  13.6k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6296:7): [True: 13.6k, False: 0]
  ------------------
 6297|  13.6k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6297:9): [True: 0, False: 13.6k]
  ------------------
 6298|      0|      reportDefault(parser, enc, start, end);
 6299|  13.6k|    return 1;
 6300|  13.6k|  }
 6301|      0|  start += enc->minBytesPerChar * 2;
 6302|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6303|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6304|      0|  if (! target)
  ------------------
  |  Branch (6304:7): [True: 0, False: 0]
  ------------------
 6305|      0|    return 0;
 6306|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6307|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6308|      0|                         end - enc->minBytesPerChar * 2);
 6309|      0|  if (! data)
  ------------------
  |  Branch (6309:7): [True: 0, False: 0]
  ------------------
 6310|      0|    return 0;
 6311|      0|  normalizeLines(data);
 6312|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6313|      0|  poolClear(&parser->m_tempPool);
 6314|      0|  return 1;
 6315|      0|}
xmlparse.c:reportComment:
 6319|  2.10k|              const char *end) {
 6320|  2.10k|  XML_Char *data;
 6321|  2.10k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6321:7): [True: 2.10k, False: 0]
  ------------------
 6322|  2.10k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6322:9): [True: 0, False: 2.10k]
  ------------------
 6323|      0|      reportDefault(parser, enc, start, end);
 6324|  2.10k|    return 1;
 6325|  2.10k|  }
 6326|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6327|      0|                         start + enc->minBytesPerChar * 4,
 6328|      0|                         end - enc->minBytesPerChar * 3);
 6329|      0|  if (! data)
  ------------------
  |  Branch (6329:7): [True: 0, False: 0]
  ------------------
 6330|      0|    return 0;
 6331|      0|  normalizeLines(data);
 6332|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6333|      0|  poolClear(&parser->m_tempPool);
 6334|      0|  return 1;
 6335|      0|}
xmlparse.c:getDebugLevel:
 8390|  40.1k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8391|  40.1k|  const char *const valueOrNull = getenv(variableName);
 8392|  40.1k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8392:7): [True: 40.1k, False: 0]
  ------------------
 8393|  40.1k|    return defaultDebugLevel;
 8394|  40.1k|  }
 8395|      0|  const char *const value = valueOrNull;
 8396|       |
 8397|      0|  errno = 0;
 8398|      0|  char *afterValue = NULL;
 8399|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8400|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8400:7): [True: 0, False: 0]
  |  Branch (8400:23): [True: 0, False: 0]
  |  Branch (8400:48): [True: 0, False: 0]
  ------------------
 8401|      0|    errno = 0;
 8402|      0|    return defaultDebugLevel;
 8403|      0|  }
 8404|       |
 8405|      0|  return debugLevel;
 8406|      0|}
xmlparse.c:destroyBindings:
 1428|  3.22M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1429|  3.22M|  for (;;) {
 1430|  3.22M|    BINDING *b = bindings;
 1431|  3.22M|    if (! b)
  ------------------
  |  Branch (1431:9): [True: 3.22M, False: 0]
  ------------------
 1432|  3.22M|      break;
 1433|      0|    bindings = b->nextTagBinding;
 1434|      0|    FREE(parser, b->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1435|      0|    FREE(parser, b);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|  }
 1437|  3.22M|}
xmlparse.c:startParsing:
  953|  20.0k|startParsing(XML_Parser parser) {
  954|       |  /* hash functions must be initialized before setContext() is called */
  955|  20.0k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (955:7): [True: 0, False: 20.0k]
  ------------------
  956|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  957|  20.0k|  if (parser->m_ns) {
  ------------------
  |  Branch (957:7): [True: 0, False: 20.0k]
  ------------------
  958|       |    /* implicit context only set for root parser, since child
  959|       |       parsers (i.e. external entity parsers) will inherit it
  960|       |    */
  961|      0|    return setContext(parser, implicitContext);
  962|      0|  }
  963|  20.0k|  return XML_TRUE;
  ------------------
  |  |   55|  20.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  964|  20.0k|}
xmlparse.c:dtdDestroy:
 6788|  20.0k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6789|  20.0k|  HASH_TABLE_ITER iter;
 6790|  20.0k|  hashTableIterInit(&iter, &(p->elementTypes));
 6791|  42.0k|  for (;;) {
 6792|  42.0k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6793|  42.0k|    if (! e)
  ------------------
  |  Branch (6793:9): [True: 20.0k, False: 22.0k]
  ------------------
 6794|  20.0k|      break;
 6795|  22.0k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6795:9): [True: 4.44k, False: 17.5k]
  ------------------
 6796|  4.44k|      ms->free_fcn(e->defaultAtts);
 6797|  22.0k|  }
 6798|  20.0k|  hashTableDestroy(&(p->generalEntities));
 6799|  20.0k|#ifdef XML_DTD
 6800|  20.0k|  hashTableDestroy(&(p->paramEntities));
 6801|  20.0k|#endif /* XML_DTD */
 6802|  20.0k|  hashTableDestroy(&(p->elementTypes));
 6803|  20.0k|  hashTableDestroy(&(p->attributeIds));
 6804|  20.0k|  hashTableDestroy(&(p->prefixes));
 6805|  20.0k|  poolDestroy(&(p->pool));
 6806|  20.0k|  poolDestroy(&(p->entityValuePool));
 6807|  20.0k|  if (isDocEntity) {
  ------------------
  |  Branch (6807:7): [True: 20.0k, False: 0]
  ------------------
 6808|  20.0k|    ms->free_fcn(p->scaffIndex);
 6809|  20.0k|    ms->free_fcn(p->scaffold);
 6810|  20.0k|  }
 6811|  20.0k|  ms->free_fcn(p);
 6812|  20.0k|}
xmlparse.c:hashTableDestroy:
 7141|   100k|hashTableDestroy(HASH_TABLE *table) {
 7142|   100k|  size_t i;
 7143|  1.26M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7143:15): [True: 1.16M, False: 100k]
  ------------------
 7144|  1.16M|    table->mem->free_fcn(table->v[i]);
 7145|   100k|  table->mem->free_fcn(table->v);
 7146|   100k|}
xmlparse.c:poolClear:
 7184|  3.22M|poolClear(STRING_POOL *pool) {
 7185|  3.22M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7185:7): [True: 76.7k, False: 3.14M]
  ------------------
 7186|  76.7k|    pool->freeBlocks = pool->blocks;
 7187|  3.14M|  else {
 7188|  3.14M|    BLOCK *p = pool->blocks;
 7189|  3.15M|    while (p) {
  ------------------
  |  Branch (7189:12): [True: 3.17k, False: 3.14M]
  ------------------
 7190|  3.17k|      BLOCK *tem = p->next;
 7191|  3.17k|      p->next = pool->freeBlocks;
 7192|  3.17k|      pool->freeBlocks = p;
 7193|  3.17k|      p = tem;
 7194|  3.17k|    }
 7195|  3.14M|  }
 7196|  3.22M|  pool->blocks = NULL;
 7197|  3.22M|  pool->start = NULL;
 7198|  3.22M|  pool->ptr = NULL;
 7199|  3.22M|  pool->end = NULL;
 7200|  3.22M|}
xmlparse.c:poolDestroy:
 7203|  80.2k|poolDestroy(STRING_POOL *pool) {
 7204|  80.2k|  BLOCK *p = pool->blocks;
 7205|   100k|  while (p) {
  ------------------
  |  Branch (7205:10): [True: 19.8k, False: 80.2k]
  ------------------
 7206|  19.8k|    BLOCK *tem = p->next;
 7207|  19.8k|    pool->mem->free_fcn(p);
 7208|  19.8k|    p = tem;
 7209|  19.8k|  }
 7210|  80.2k|  p = pool->freeBlocks;
 7211|  82.7k|  while (p) {
  ------------------
  |  Branch (7211:10): [True: 2.50k, False: 80.2k]
  ------------------
 7212|  2.50k|    BLOCK *tem = p->next;
 7213|  2.50k|    pool->mem->free_fcn(p);
 7214|  2.50k|    p = tem;
 7215|  2.50k|  }
 7216|  80.2k|}
xmlparse.c:poolCopyString:
 7236|  15.9k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7237|  2.03M|  do {
 7238|  2.03M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  602|  2.03M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 8.05k, False: 2.03M]
  |  |  |  Branch (602:35): [True: 0, False: 8.05k]
  |  |  ------------------
  |  |  603|  2.03M|       ? 0                                                                     \
  |  |  604|  2.03M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7238:9): [True: 0, False: 2.03M]
  ------------------
 7239|      0|      return NULL;
 7240|  2.03M|  } while (*s++);
  ------------------
  |  Branch (7240:12): [True: 2.02M, False: 15.9k]
  ------------------
 7241|  15.9k|  s = pool->start;
 7242|  15.9k|  poolFinish(pool);
  ------------------
  |  |  600|  15.9k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7243|  15.9k|  return s;
 7244|  15.9k|}
xmlparse.c:copyString:
 7636|  20.0k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7637|  20.0k|  size_t charsRequired = 0;
 7638|  20.0k|  XML_Char *result;
 7639|       |
 7640|       |  /* First determine how long the string is */
 7641|   140k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7641:10): [True: 120k, False: 20.0k]
  ------------------
 7642|   120k|    charsRequired++;
 7643|   120k|  }
 7644|       |  /* Include the terminator */
 7645|  20.0k|  charsRequired++;
 7646|       |
 7647|       |  /* Now allocate space for the copy */
 7648|  20.0k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7649|  20.0k|  if (result == NULL)
  ------------------
  |  Branch (7649:7): [True: 0, False: 20.0k]
  ------------------
 7650|      0|    return NULL;
 7651|       |  /* Copy the original into place */
 7652|  20.0k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7653|  20.0k|  return result;
 7654|  20.0k|}

XmlPrologStateInit:
 1237|  20.0k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  20.0k|  state->handler = prolog0;
 1239|  20.0k|#ifdef XML_DTD
 1240|  20.0k|  state->documentEntity = 1;
 1241|  20.0k|  state->includeLevel = 0;
 1242|  20.0k|  state->inEntityValue = 0;
 1243|  20.0k|#endif /* XML_DTD */
 1244|  20.0k|}
xmlrole.c:prolog0:
  142|  24.2k|        const ENCODING *enc) {
  143|  24.2k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 290, False: 23.9k]
  ------------------
  144|    459|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    459|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 459, False: 23.7k]
  ------------------
  145|    459|    state->handler = prolog1;
  146|    459|    return XML_ROLE_NONE;
  147|    315|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    315|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 315, False: 23.9k]
  ------------------
  148|    315|    state->handler = prolog1;
  149|    315|    return XML_ROLE_XML_DECL;
  150|    341|  case XML_TOK_PI:
  ------------------
  |  |   76|    341|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 341, False: 23.9k]
  ------------------
  151|    341|    state->handler = prolog1;
  152|    341|    return XML_ROLE_PI;
  153|     55|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     55|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 55, False: 24.1k]
  ------------------
  154|     55|    state->handler = prolog1;
  155|     55|    return XML_ROLE_COMMENT;
  156|  7.53k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  7.53k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 7.53k, False: 16.7k]
  ------------------
  157|  7.53k|    return XML_ROLE_NONE;
  158|  5.98k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.98k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.98k, False: 18.2k]
  ------------------
  159|  5.98k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.98k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 107, False: 5.87k]
  ------------------
  160|  5.98k|                              KW_DOCTYPE))
  161|    107|      break;
  162|  5.87k|    state->handler = doctype0;
  163|  5.87k|    return XML_ROLE_DOCTYPE_NONE;
  164|  9.27k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  9.27k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 9.27k, False: 14.9k]
  ------------------
  165|  9.27k|    state->handler = error;
  166|  9.27k|    return XML_ROLE_INSTANCE_START;
  167|  24.2k|  }
  168|    397|  return common(state, tok);
  169|  24.2k|}
xmlrole.c:prolog1:
  173|  5.85k|        const ENCODING *enc) {
  174|  5.85k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 8, False: 5.84k]
  ------------------
  175|    398|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    398|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 398, False: 5.45k]
  ------------------
  176|    398|    return XML_ROLE_NONE;
  177|  4.52k|  case XML_TOK_PI:
  ------------------
  |  |   76|  4.52k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 4.52k, False: 1.32k]
  ------------------
  178|  4.52k|    return XML_ROLE_PI;
  179|    633|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    633|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 633, False: 5.21k]
  ------------------
  180|    633|    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.85k]
  ------------------
  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|    246|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    246|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 246, False: 5.60k]
  ------------------
  191|    246|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    246|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 3, False: 243]
  ------------------
  192|    246|                              KW_DOCTYPE))
  193|      3|      break;
  194|    243|    state->handler = doctype0;
  195|    243|    return XML_ROLE_DOCTYPE_NONE;
  196|     37|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     37|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 37, False: 5.81k]
  ------------------
  197|     37|    state->handler = error;
  198|     37|    return XML_ROLE_INSTANCE_START;
  199|  5.85k|  }
  200|     11|  return common(state, tok);
  201|  5.85k|}
xmlrole.c:doctype0:
  225|  12.2k|         const ENCODING *enc) {
  226|  12.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  12.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  12.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  12.2k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 10, False: 12.2k]
  ------------------
  230|  6.11k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.11k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 6.11k, False: 6.10k]
  ------------------
  231|  6.11k|    return XML_ROLE_DOCTYPE_NONE;
  232|  6.09k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  6.09k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 6.09k, False: 6.12k]
  ------------------
  233|  6.09k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  6.09k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 12.2k]
  ------------------
  234|  6.09k|    state->handler = doctype1;
  235|  6.09k|    return XML_ROLE_DOCTYPE_NAME;
  236|  12.2k|  }
  237|     10|  return common(state, tok);
  238|  12.2k|}
xmlrole.c:doctype1:
  242|  7.40k|         const ENCODING *enc) {
  243|  7.40k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 1, False: 7.40k]
  ------------------
  244|  1.32k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.32k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.32k, False: 6.08k]
  ------------------
  245|  1.32k|    return XML_ROLE_DOCTYPE_NONE;
  246|  5.27k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  5.27k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 5.27k, False: 2.13k]
  ------------------
  247|  5.27k|    state->handler = internalSubset;
  248|  5.27k|    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: 7.36k]
  ------------------
  250|     46|    state->handler = prolog2;
  251|     46|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    765|  case XML_TOK_NAME:
  ------------------
  |  |   85|    765|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 765, False: 6.64k]
  ------------------
  253|    765|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    765|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 14, False: 751]
  |  |  ------------------
  ------------------
  254|     14|      state->handler = doctype3;
  255|     14|      return XML_ROLE_DOCTYPE_NONE;
  256|     14|    }
  257|    751|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    751|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 729, False: 22]
  |  |  ------------------
  ------------------
  258|    729|      state->handler = doctype2;
  259|    729|      return XML_ROLE_DOCTYPE_NONE;
  260|    729|    }
  261|     22|    break;
  262|  7.40k|  }
  263|     23|  return common(state, tok);
  264|  7.40k|}
xmlrole.c:internalSubset:
  335|  47.4k|               const ENCODING *enc) {
  336|  47.4k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 83, False: 47.3k]
  ------------------
  337|  8.68k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.68k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 8.68k, False: 38.7k]
  ------------------
  338|  8.68k|    return XML_ROLE_NONE;
  339|  31.3k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  31.3k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 31.3k, False: 16.1k]
  ------------------
  340|  31.3k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  31.3k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 12.1k, False: 19.1k]
  |  |  ------------------
  ------------------
  341|  31.3k|                            KW_ENTITY)) {
  342|  12.1k|      state->handler = entity0;
  343|  12.1k|      return XML_ROLE_ENTITY_NONE;
  344|  12.1k|    }
  345|  19.1k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  19.1k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10.9k, False: 8.28k]
  |  |  ------------------
  ------------------
  346|  19.1k|                            KW_ATTLIST)) {
  347|  10.9k|      state->handler = attlist0;
  348|  10.9k|      return XML_ROLE_ATTLIST_NONE;
  349|  10.9k|    }
  350|  8.28k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  8.28k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 6.39k, False: 1.88k]
  |  |  ------------------
  ------------------
  351|  8.28k|                            KW_ELEMENT)) {
  352|  6.39k|      state->handler = element0;
  353|  6.39k|      return XML_ROLE_ELEMENT_NONE;
  354|  6.39k|    }
  355|  1.88k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.88k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.85k, False: 32]
  |  |  ------------------
  ------------------
  356|  1.88k|                            KW_NOTATION)) {
  357|  1.85k|      state->handler = notation0;
  358|  1.85k|      return XML_ROLE_NOTATION_NONE;
  359|  1.85k|    }
  360|     32|    break;
  361|  1.22k|  case XML_TOK_PI:
  ------------------
  |  |   76|  1.22k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 1.22k, False: 46.2k]
  ------------------
  362|  1.22k|    return XML_ROLE_PI;
  363|    194|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 194, False: 47.2k]
  ------------------
  364|    194|    return XML_ROLE_COMMENT;
  365|  3.71k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  3.71k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 3.71k, False: 43.7k]
  ------------------
  366|  3.71k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.24k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.24k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.24k, False: 45.2k]
  ------------------
  368|  2.24k|    state->handler = doctype5;
  369|  2.24k|    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: 47.4k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  47.4k|  }
  373|    115|  return common(state, tok);
  374|  47.4k|}
xmlrole.c:entity0:
  417|  24.2k|        const ENCODING *enc) {
  418|  24.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  24.2k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  24.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  24.2k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  24.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.2k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  24.2k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 15, False: 24.2k]
  ------------------
  422|  12.1k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  12.1k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 12.1k, False: 12.1k]
  ------------------
  423|  12.1k|    return XML_ROLE_ENTITY_NONE;
  424|  4.30k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  4.30k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 4.30k, False: 19.9k]
  ------------------
  425|  4.30k|    state->handler = entity1;
  426|  4.30k|    return XML_ROLE_ENTITY_NONE;
  427|  7.78k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  7.78k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 7.78k, False: 16.4k]
  ------------------
  428|  7.78k|    state->handler = entity2;
  429|  7.78k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  24.2k|  }
  431|     15|  return common(state, tok);
  432|  24.2k|}
xmlrole.c:entity1:
  436|  8.59k|        const ENCODING *enc) {
  437|  8.59k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  8.59k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  8.59k|  UNUSED_P(end);
  ------------------
  |  |  135|  8.59k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  8.59k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.59k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  8.59k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 45, False: 8.55k]
  ------------------
  441|  4.30k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.30k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 4.30k, False: 4.29k]
  ------------------
  442|  4.30k|    return XML_ROLE_ENTITY_NONE;
  443|  4.24k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  4.24k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 4.24k, False: 4.34k]
  ------------------
  444|  4.24k|    state->handler = entity7;
  445|  4.24k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  8.59k|  }
  447|     45|  return common(state, tok);
  448|  8.59k|}
xmlrole.c:entity7:
  544|  8.46k|        const ENCODING *enc) {
  545|  8.46k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 13, False: 8.45k]
  ------------------
  546|  4.24k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.24k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 4.24k, False: 4.22k]
  ------------------
  547|  4.24k|    return XML_ROLE_ENTITY_NONE;
  548|  1.35k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.35k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.35k, False: 7.11k]
  ------------------
  549|  1.35k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.35k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 600, False: 751]
  |  |  ------------------
  ------------------
  550|    600|      state->handler = entity9;
  551|    600|      return XML_ROLE_ENTITY_NONE;
  552|    600|    }
  553|    751|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    751|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 746, False: 5]
  |  |  ------------------
  ------------------
  554|    746|      state->handler = entity8;
  555|    746|      return XML_ROLE_ENTITY_NONE;
  556|    746|    }
  557|      5|    break;
  558|  2.86k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.86k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 2.86k, False: 5.60k]
  ------------------
  559|  2.86k|    state->handler = declClose;
  560|  2.86k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  2.86k|    return XML_ROLE_ENTITY_VALUE;
  562|  8.46k|  }
  563|     18|  return common(state, tok);
  564|  8.46k|}
xmlrole.c:entity9:
  584|  2.66k|        const ENCODING *enc) {
  585|  2.66k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.66k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  2.66k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.66k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  2.66k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.66k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  2.66k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 3, False: 2.66k]
  ------------------
  589|  1.33k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.33k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.33k, False: 1.32k]
  ------------------
  590|  1.33k|    return XML_ROLE_ENTITY_NONE;
  591|  1.32k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.32k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.32k, False: 1.34k]
  ------------------
  592|  1.32k|    state->handler = entity10;
  593|  1.32k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  2.66k|  }
  595|      3|  return common(state, tok);
  596|  2.66k|}
xmlrole.c:entity10:
  600|  1.92k|         const ENCODING *enc) {
  601|  1.92k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.92k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  1.92k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.92k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  1.92k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.92k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  1.92k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 1, False: 1.92k]
  ------------------
  605|    601|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    601|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 601, False: 1.32k]
  ------------------
  606|    601|    return XML_ROLE_ENTITY_NONE;
  607|  1.32k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.32k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.32k, False: 602]
  ------------------
  608|  1.32k|    setTopLevel(state);
  ------------------
  |  |  116|  1.32k|    ((state)->handler                                                          \
  |  |  117|  1.32k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.32k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.32k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  1.92k|  }
  611|      1|  return common(state, tok);
  612|  1.92k|}
xmlrole.c:entity8:
  568|  1.48k|        const ENCODING *enc) {
  569|  1.48k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.48k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  1.48k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.48k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  1.48k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.48k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  1.48k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 1.48k]
  ------------------
  573|    745|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    745|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 745, False: 742]
  ------------------
  574|    745|    return XML_ROLE_ENTITY_NONE;
  575|    740|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    740|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 740, False: 747]
  ------------------
  576|    740|    state->handler = entity9;
  577|    740|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  1.48k|  }
  579|      2|  return common(state, tok);
  580|  1.48k|}
xmlrole.c:declClose:
 1178|  16.9k|          const ENCODING *enc) {
 1179|  16.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  16.9k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  16.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  16.9k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  16.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  16.9k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  16.9k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 127, False: 16.8k]
  ------------------
 1183|  1.67k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.67k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 1.67k, False: 15.2k]
  ------------------
 1184|  1.67k|    return state->role_none;
 1185|  15.1k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  15.1k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 15.1k, False: 1.79k]
  ------------------
 1186|  15.1k|    setTopLevel(state);
  ------------------
  |  |  116|  15.1k|    ((state)->handler                                                          \
  |  |  117|  15.1k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 15.1k, False: 0]
  |  |  ------------------
  ------------------
 1187|  15.1k|    return state->role_none;
 1188|  16.9k|  }
 1189|    127|  return common(state, tok);
 1190|  16.9k|}
xmlrole.c:entity2:
  452|  15.5k|        const ENCODING *enc) {
  453|  15.5k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 10, False: 15.5k]
  ------------------
  454|  7.78k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  7.78k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 7.78k, False: 7.74k]
  ------------------
  455|  7.78k|    return XML_ROLE_ENTITY_NONE;
  456|  1.96k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.96k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 1.96k, False: 13.5k]
  ------------------
  457|  1.96k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.96k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 547, False: 1.41k]
  |  |  ------------------
  ------------------
  458|    547|      state->handler = entity4;
  459|    547|      return XML_ROLE_ENTITY_NONE;
  460|    547|    }
  461|  1.41k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.41k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.41k, False: 4]
  |  |  ------------------
  ------------------
  462|  1.41k|      state->handler = entity3;
  463|  1.41k|      return XML_ROLE_ENTITY_NONE;
  464|  1.41k|    }
  465|      4|    break;
  466|  5.76k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  5.76k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 5.76k, False: 9.75k]
  ------------------
  467|  5.76k|    state->handler = declClose;
  468|  5.76k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  5.76k|    return XML_ROLE_ENTITY_VALUE;
  470|  15.5k|  }
  471|     14|  return common(state, tok);
  472|  15.5k|}
xmlrole.c:entity4:
  492|  3.85k|        const ENCODING *enc) {
  493|  3.85k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.85k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  3.85k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.85k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  3.85k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.85k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  3.85k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 8, False: 3.84k]
  ------------------
  497|  1.93k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.93k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 1.93k, False: 1.92k]
  ------------------
  498|  1.93k|    return XML_ROLE_ENTITY_NONE;
  499|  1.91k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.91k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 1.91k, False: 1.94k]
  ------------------
  500|  1.91k|    state->handler = entity5;
  501|  1.91k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  3.85k|  }
  503|      8|  return common(state, tok);
  504|  3.85k|}
xmlrole.c:entity5:
  508|  3.46k|        const ENCODING *enc) {
  509|  3.46k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 4, False: 3.46k]
  ------------------
  510|  1.55k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.55k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.55k, False: 1.90k]
  ------------------
  511|  1.55k|    return XML_ROLE_ENTITY_NONE;
  512|  1.53k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.53k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 1.53k, False: 1.93k]
  ------------------
  513|  1.53k|    setTopLevel(state);
  ------------------
  |  |  116|  1.53k|    ((state)->handler                                                          \
  |  |  117|  1.53k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.53k, False: 0]
  |  |  ------------------
  ------------------
  514|  1.53k|    return XML_ROLE_ENTITY_COMPLETE;
  515|    369|  case XML_TOK_NAME:
  ------------------
  |  |   85|    369|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 369, False: 3.09k]
  ------------------
  516|    369|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    369|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 366, False: 3]
  |  |  ------------------
  ------------------
  517|    366|      state->handler = entity6;
  518|    366|      return XML_ROLE_ENTITY_NONE;
  519|    366|    }
  520|      3|    break;
  521|  3.46k|  }
  522|      7|  return common(state, tok);
  523|  3.46k|}
xmlrole.c:entity6:
  527|    729|        const ENCODING *enc) {
  528|    729|  UNUSED_P(ptr);
  ------------------
  |  |  135|    729|#  define UNUSED_P(p) (void)p
  ------------------
  529|    729|  UNUSED_P(end);
  ------------------
  |  |  135|    729|#  define UNUSED_P(p) (void)p
  ------------------
  530|    729|  UNUSED_P(enc);
  ------------------
  |  |  135|    729|#  define UNUSED_P(p) (void)p
  ------------------
  531|    729|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 3, False: 726]
  ------------------
  532|    365|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    365|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 365, False: 364]
  ------------------
  533|    365|    return XML_ROLE_ENTITY_NONE;
  534|    361|  case XML_TOK_NAME:
  ------------------
  |  |   85|    361|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 361, False: 368]
  ------------------
  535|    361|    state->handler = declClose;
  536|    361|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    361|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|    729|  }
  539|      3|  return common(state, tok);
  540|    729|}
xmlrole.c:entity3:
  476|  2.81k|        const ENCODING *enc) {
  477|  2.81k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.81k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  2.81k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.81k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  2.81k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.81k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  2.81k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 3, False: 2.81k]
  ------------------
  481|  1.41k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.41k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 1.41k, False: 1.40k]
  ------------------
  482|  1.41k|    return XML_ROLE_ENTITY_NONE;
  483|  1.40k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.40k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 1.40k, False: 1.41k]
  ------------------
  484|  1.40k|    state->handler = entity4;
  485|  1.40k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  2.81k|  }
  487|      3|  return common(state, tok);
  488|  2.81k|}
xmlrole.c:attlist0:
  705|  21.7k|         const ENCODING *enc) {
  706|  21.7k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  21.7k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  21.7k|  UNUSED_P(end);
  ------------------
  |  |  135|  21.7k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  21.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  21.7k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  21.7k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 13, False: 21.7k]
  ------------------
  710|  10.9k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  10.9k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 10.9k, False: 10.8k]
  ------------------
  711|  10.9k|    return XML_ROLE_ATTLIST_NONE;
  712|  10.8k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.8k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 10.8k, False: 10.9k]
  ------------------
  713|  10.8k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  10.8k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 21.7k]
  ------------------
  714|  10.8k|    state->handler = attlist1;
  715|  10.8k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  21.7k|  }
  717|     13|  return common(state, tok);
  718|  21.7k|}
xmlrole.c:attlist1:
  722|  96.7k|         const ENCODING *enc) {
  723|  96.7k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  96.7k|#  define UNUSED_P(p) (void)p
  ------------------
  724|  96.7k|  UNUSED_P(end);
  ------------------
  |  |  135|  96.7k|#  define UNUSED_P(p) (void)p
  ------------------
  725|  96.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  96.7k|#  define UNUSED_P(p) (void)p
  ------------------
  726|  96.7k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 58, False: 96.6k]
  ------------------
  727|  43.5k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  43.5k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 43.5k, False: 53.2k]
  ------------------
  728|  43.5k|    return XML_ROLE_ATTLIST_NONE;
  729|  10.0k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  10.0k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 10.0k, False: 86.6k]
  ------------------
  730|  10.0k|    setTopLevel(state);
  ------------------
  |  |  116|  10.0k|    ((state)->handler                                                          \
  |  |  117|  10.0k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 10.0k, False: 0]
  |  |  ------------------
  ------------------
  731|  10.0k|    return XML_ROLE_ATTLIST_NONE;
  732|  43.1k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  43.1k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 43.1k, False: 53.6k]
  ------------------
  733|  43.1k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  43.1k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 96.7k]
  ------------------
  734|  43.1k|    state->handler = attlist2;
  735|  43.1k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|  96.7k|  }
  737|     58|  return common(state, tok);
  738|  96.7k|}
xmlrole.c:attlist2:
  742|  86.1k|         const ENCODING *enc) {
  743|  86.1k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 17, False: 86.1k]
  ------------------
  744|  43.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  43.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 43.0k, False: 43.0k]
  ------------------
  745|  43.0k|    return XML_ROLE_ATTLIST_NONE;
  746|  36.0k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  36.0k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 36.0k, False: 50.0k]
  ------------------
  747|  36.0k|    static const char *const types[] = {
  748|  36.0k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  36.0k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  36.0k|    };
  751|  36.0k|    int i;
  752|   139k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 139k, False: 406]
  ------------------
  753|   139k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|   139k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 35.6k, False: 103k]
  |  |  ------------------
  ------------------
  754|  35.6k|        state->handler = attlist8;
  755|  35.6k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  35.6k|      }
  757|  36.0k|  }
  758|    406|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    406|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 361, False: 45]
  |  |  ------------------
  ------------------
  759|    361|      state->handler = attlist5;
  760|    361|      return XML_ROLE_ATTLIST_NONE;
  761|    361|    }
  762|     45|    break;
  763|  6.93k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  6.93k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 6.93k, False: 79.2k]
  ------------------
  764|  6.93k|    state->handler = attlist3;
  765|  6.93k|    return XML_ROLE_ATTLIST_NONE;
  766|  86.1k|  }
  767|     62|  return common(state, tok);
  768|  86.1k|}
xmlrole.c:attlist8:
  861|  85.3k|         const ENCODING *enc) {
  862|  85.3k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 23, False: 85.3k]
  ------------------
  863|  42.7k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  42.7k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 42.7k, False: 42.6k]
  ------------------
  864|  42.7k|    return XML_ROLE_ATTLIST_NONE;
  865|  19.5k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  19.5k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 19.5k, False: 65.8k]
  ------------------
  866|  19.5k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  19.5k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 17.0k, False: 2.47k]
  |  |  ------------------
  ------------------
  867|  19.5k|                            KW_IMPLIED)) {
  868|  17.0k|      state->handler = attlist1;
  869|  17.0k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  17.0k|    }
  871|  2.47k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.47k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 955, False: 1.52k]
  |  |  ------------------
  ------------------
  872|  2.47k|                            KW_REQUIRED)) {
  873|    955|      state->handler = attlist1;
  874|    955|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|    955|    }
  876|  1.52k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.52k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.51k, False: 7]
  |  |  ------------------
  ------------------
  877|  1.52k|                            KW_FIXED)) {
  878|  1.51k|      state->handler = attlist9;
  879|  1.51k|      return XML_ROLE_ATTLIST_NONE;
  880|  1.51k|    }
  881|      7|    break;
  882|  23.0k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  23.0k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 23.0k, False: 62.3k]
  ------------------
  883|  23.0k|    state->handler = attlist1;
  884|  23.0k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  85.3k|  }
  886|     30|  return common(state, tok);
  887|  85.3k|}
xmlrole.c:attlist9:
  891|  3.01k|         const ENCODING *enc) {
  892|  3.01k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.01k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  3.01k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.01k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  3.01k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.01k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  3.01k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 24, False: 2.98k]
  ------------------
  896|  1.51k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.51k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 1.51k, False: 1.49k]
  ------------------
  897|  1.51k|    return XML_ROLE_ATTLIST_NONE;
  898|  1.47k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.47k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 1.47k, False: 1.54k]
  ------------------
  899|  1.47k|    state->handler = attlist1;
  900|  1.47k|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  3.01k|  }
  902|     24|  return common(state, tok);
  903|  3.01k|}
xmlrole.c:attlist5:
  809|    717|         const ENCODING *enc) {
  810|    717|  UNUSED_P(ptr);
  ------------------
  |  |  135|    717|#  define UNUSED_P(p) (void)p
  ------------------
  811|    717|  UNUSED_P(end);
  ------------------
  |  |  135|    717|#  define UNUSED_P(p) (void)p
  ------------------
  812|    717|  UNUSED_P(enc);
  ------------------
  |  |  135|    717|#  define UNUSED_P(p) (void)p
  ------------------
  813|    717|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 2, False: 715]
  ------------------
  814|    360|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    360|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 360, False: 357]
  ------------------
  815|    360|    return XML_ROLE_ATTLIST_NONE;
  816|    355|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    355|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 355, False: 362]
  ------------------
  817|    355|    state->handler = attlist6;
  818|    355|    return XML_ROLE_ATTLIST_NONE;
  819|    717|  }
  820|      2|  return common(state, tok);
  821|    717|}
xmlrole.c:attlist6:
  825|  1.31k|         const ENCODING *enc) {
  826|  1.31k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.31k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.31k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.31k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.31k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.31k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.31k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 8, False: 1.30k]
  ------------------
  830|    263|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    263|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 263, False: 1.04k]
  ------------------
  831|    263|    return XML_ROLE_ATTLIST_NONE;
  832|  1.03k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.03k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 1.03k, False: 271]
  ------------------
  833|  1.03k|    state->handler = attlist7;
  834|  1.03k|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.31k|  }
  836|      8|  return common(state, tok);
  837|  1.31k|}
xmlrole.c:attlist7:
  841|  1.41k|         const ENCODING *enc) {
  842|  1.41k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.41k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.41k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.41k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 1, False: 1.40k]
  ------------------
  846|    375|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    375|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 375, False: 1.03k]
  ------------------
  847|    375|    return XML_ROLE_ATTLIST_NONE;
  848|    317|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    317|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 317, False: 1.09k]
  ------------------
  849|    317|    state->handler = attlist8;
  850|    317|    return XML_ROLE_ATTLIST_NONE;
  851|    717|  case XML_TOK_OR:
  ------------------
  |  |   88|    717|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 717, False: 693]
  ------------------
  852|    717|    state->handler = attlist6;
  853|    717|    return XML_ROLE_ATTLIST_NONE;
  854|  1.41k|  }
  855|      1|  return common(state, tok);
  856|  1.41k|}
xmlrole.c:attlist3:
  772|  12.2k|         const ENCODING *enc) {
  773|  12.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  12.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  12.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  12.2k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 6, False: 12.2k]
  ------------------
  777|  1.01k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.01k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 1.01k, False: 11.2k]
  ------------------
  778|  1.01k|    return XML_ROLE_ATTLIST_NONE;
  779|  3.44k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  3.44k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 3.44k, False: 8.78k]
  ------------------
  780|  11.2k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  11.2k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 7.76k, False: 4.45k]
  ------------------
  781|  11.2k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  11.2k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 12.2k]
  ------------------
  782|  11.2k|    state->handler = attlist4;
  783|  11.2k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  12.2k|  }
  785|      6|  return common(state, tok);
  786|  12.2k|}
xmlrole.c:attlist4:
  790|  12.1k|         const ENCODING *enc) {
  791|  12.1k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.1k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  12.1k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.1k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  12.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.1k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  12.1k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 6, False: 12.1k]
  ------------------
  795|    939|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    939|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 939, False: 11.1k]
  ------------------
  796|    939|    return XML_ROLE_ATTLIST_NONE;
  797|  6.74k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  6.74k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 6.74k, False: 5.37k]
  ------------------
  798|  6.74k|    state->handler = attlist8;
  799|  6.74k|    return XML_ROLE_ATTLIST_NONE;
  800|  4.43k|  case XML_TOK_OR:
  ------------------
  |  |   88|  4.43k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 4.43k, False: 7.69k]
  ------------------
  801|  4.43k|    state->handler = attlist3;
  802|  4.43k|    return XML_ROLE_ATTLIST_NONE;
  803|  12.1k|  }
  804|      6|  return common(state, tok);
  805|  12.1k|}
xmlrole.c:element0:
  907|  12.7k|         const ENCODING *enc) {
  908|  12.7k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.7k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  12.7k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.7k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  12.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.7k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  12.7k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 5, False: 12.7k]
  ------------------
  912|  6.39k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.39k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 6.39k, False: 6.38k]
  ------------------
  913|  6.39k|    return XML_ROLE_ELEMENT_NONE;
  914|  6.38k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  6.38k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 6.38k, False: 6.39k]
  ------------------
  915|  6.38k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  6.38k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 12.7k]
  ------------------
  916|  6.38k|    state->handler = element1;
  917|  6.38k|    return XML_ROLE_ELEMENT_NAME;
  918|  12.7k|  }
  919|      5|  return common(state, tok);
  920|  12.7k|}
xmlrole.c:element1:
  924|  12.7k|         const ENCODING *enc) {
  925|  12.7k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 6, False: 12.7k]
  ------------------
  926|  6.38k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.38k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 6.38k, False: 6.37k]
  ------------------
  927|  6.38k|    return XML_ROLE_ELEMENT_NONE;
  928|    352|  case XML_TOK_NAME:
  ------------------
  |  |   85|    352|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 352, False: 12.4k]
  ------------------
  929|    352|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|    352|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 272, False: 80]
  |  |  ------------------
  ------------------
  930|    272|      state->handler = declClose;
  931|    272|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|    272|      return XML_ROLE_CONTENT_EMPTY;
  933|    272|    }
  934|     80|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|     80|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 76, False: 4]
  |  |  ------------------
  ------------------
  935|     76|      state->handler = declClose;
  936|     76|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|     76|      return XML_ROLE_CONTENT_ANY;
  938|     76|    }
  939|      4|    break;
  940|  6.01k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  6.01k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 6.01k, False: 6.73k]
  ------------------
  941|  6.01k|    state->handler = element2;
  942|  6.01k|    state->level = 1;
  943|  6.01k|    return XML_ROLE_GROUP_OPEN;
  944|  12.7k|  }
  945|     10|  return common(state, tok);
  946|  12.7k|}
xmlrole.c:element2:
  950|  6.62k|         const ENCODING *enc) {
  951|  6.62k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 4, False: 6.62k]
  ------------------
  952|    619|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    619|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 619, False: 6.00k]
  ------------------
  953|    619|    return XML_ROLE_ELEMENT_NONE;
  954|  2.75k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  2.75k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 2.75k, False: 3.87k]
  ------------------
  955|  2.75k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.75k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.74k, False: 9]
  |  |  ------------------
  ------------------
  956|  2.75k|                            KW_PCDATA)) {
  957|  2.74k|      state->handler = element3;
  958|  2.74k|      return XML_ROLE_CONTENT_PCDATA;
  959|  2.74k|    }
  960|      9|    break;
  961|    975|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    975|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 975, False: 5.65k]
  ------------------
  962|    975|    state->level = 2;
  963|    975|    state->handler = element6;
  964|    975|    return XML_ROLE_GROUP_OPEN;
  965|  1.34k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.34k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 1.34k, False: 5.27k]
  ------------------
  966|  1.34k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.34k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 6.62k]
  ------------------
  967|  1.34k|    state->handler = element7;
  968|  1.34k|    return XML_ROLE_CONTENT_ELEMENT;
  969|    402|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    402|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 402, False: 6.22k]
  ------------------
  970|    402|    state->handler = element7;
  971|    402|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    441|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    441|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 441, False: 6.18k]
  ------------------
  973|    441|    state->handler = element7;
  974|    441|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|     82|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|     82|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 82, False: 6.54k]
  ------------------
  976|     82|    state->handler = element7;
  977|     82|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  6.62k|  }
  979|     13|  return common(state, tok);
  980|  6.62k|}
xmlrole.c:element3:
  984|  3.51k|         const ENCODING *enc) {
  985|  3.51k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.51k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  3.51k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.51k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  3.51k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.51k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  3.51k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 8, False: 3.51k]
  ------------------
  989|    778|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    778|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 778, False: 2.74k]
  ------------------
  990|    778|    return XML_ROLE_ELEMENT_NONE;
  991|    899|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    899|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 899, False: 2.61k]
  ------------------
  992|    899|    state->handler = declClose;
  993|    899|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|    899|    return XML_ROLE_GROUP_CLOSE;
  995|    422|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    422|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 422, False: 3.09k]
  ------------------
  996|    422|    state->handler = declClose;
  997|    422|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|    422|    return XML_ROLE_GROUP_CLOSE_REP;
  999|  1.41k|  case XML_TOK_OR:
  ------------------
  |  |   88|  1.41k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 1.41k, False: 2.10k]
  ------------------
 1000|  1.41k|    state->handler = element4;
 1001|  1.41k|    return XML_ROLE_ELEMENT_NONE;
 1002|  3.51k|  }
 1003|      8|  return common(state, tok);
 1004|  3.51k|}
xmlrole.c:element4:
 1008|  2.56k|         const ENCODING *enc) {
 1009|  2.56k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.56k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  2.56k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.56k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  2.56k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.56k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  2.56k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 20, False: 2.54k]
  ------------------
 1013|    288|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    288|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 288, False: 2.27k]
  ------------------
 1014|    288|    return XML_ROLE_ELEMENT_NONE;
 1015|  2.25k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.25k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 2.25k, False: 308]
  ------------------
 1016|  2.25k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  2.25k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 2.56k]
  ------------------
 1017|  2.25k|    state->handler = element5;
 1018|  2.25k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  2.56k|  }
 1020|     20|  return common(state, tok);
 1021|  2.56k|}
xmlrole.c:element5:
 1025|  2.73k|         const ENCODING *enc) {
 1026|  2.73k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.73k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  2.73k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.73k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  2.73k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.73k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  2.73k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 1, False: 2.73k]
  ------------------
 1030|    488|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    488|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 488, False: 2.24k]
  ------------------
 1031|    488|    return XML_ROLE_ELEMENT_NONE;
 1032|  1.34k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  1.34k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 1.34k, False: 1.38k]
  ------------------
 1033|  1.34k|    state->handler = declClose;
 1034|  1.34k|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|  1.34k|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|    894|  case XML_TOK_OR:
  ------------------
  |  |   88|    894|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 894, False: 1.83k]
  ------------------
 1037|    894|    state->handler = element4;
 1038|    894|    return XML_ROLE_ELEMENT_NONE;
 1039|  2.73k|  }
 1040|      1|  return common(state, tok);
 1041|  2.73k|}
xmlrole.c:element6:
 1045|  5.03M|         const ENCODING *enc) {
 1046|  5.03M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  5.03M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  5.03M|  UNUSED_P(end);
  ------------------
  |  |  135|  5.03M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  5.03M|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.03M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  5.03M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 60, False: 5.03M]
  ------------------
 1050|  99.8k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  99.8k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 99.8k, False: 4.93M]
  ------------------
 1051|  99.8k|    return XML_ROLE_ELEMENT_NONE;
 1052|  4.72M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  4.72M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 4.72M, False: 315k]
  ------------------
 1053|  4.72M|    state->level += 1;
 1054|  4.72M|    return XML_ROLE_GROUP_OPEN;
 1055|   209k|  case XML_TOK_NAME:
  ------------------
  |  |   85|   209k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 209k, False: 4.82M]
  ------------------
 1056|   209k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|   209k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 5.03M]
  ------------------
 1057|   209k|    state->handler = element7;
 1058|   209k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|  2.65k|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|  2.65k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 2.65k, False: 5.03M]
  ------------------
 1060|  2.65k|    state->handler = element7;
 1061|  2.65k|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|    978|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    978|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 978, False: 5.03M]
  ------------------
 1063|    978|    state->handler = element7;
 1064|    978|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|  1.99k|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|  1.99k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 1.99k, False: 5.03M]
  ------------------
 1066|  1.99k|    state->handler = element7;
 1067|  1.99k|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  5.03M|  }
 1069|     60|  return common(state, tok);
 1070|  5.03M|}
xmlrole.c:element7:
 1074|   561k|         const ENCODING *enc) {
 1075|   561k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   561k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|   561k|  UNUSED_P(end);
  ------------------
  |  |  135|   561k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|   561k|  UNUSED_P(enc);
  ------------------
  |  |  135|   561k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|   561k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 56, False: 561k]
  ------------------
 1079|  2.61k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.61k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 2.61k, False: 558k]
  ------------------
 1080|  2.61k|    return XML_ROLE_ELEMENT_NONE;
 1081|   210k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|   210k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 210k, False: 350k]
  ------------------
 1082|   210k|    state->level -= 1;
 1083|   210k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 1.80k, False: 208k]
  ------------------
 1084|  1.80k|      state->handler = declClose;
 1085|  1.80k|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|  1.80k|    }
 1087|   210k|    return XML_ROLE_GROUP_CLOSE;
 1088|  35.6k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  35.6k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 35.6k, False: 525k]
  ------------------
 1089|  35.6k|    state->level -= 1;
 1090|  35.6k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 419, False: 35.2k]
  ------------------
 1091|    419|      state->handler = declClose;
 1092|    419|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    419|    }
 1094|  35.6k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  27.3k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  27.3k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 27.3k, False: 533k]
  ------------------
 1096|  27.3k|    state->level -= 1;
 1097|  27.3k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 262, False: 27.1k]
  ------------------
 1098|    262|      state->handler = declClose;
 1099|    262|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    262|    }
 1101|  27.3k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  70.1k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  70.1k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 70.1k, False: 490k]
  ------------------
 1103|  70.1k|    state->level -= 1;
 1104|  70.1k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 312, False: 69.7k]
  ------------------
 1105|    312|      state->handler = declClose;
 1106|    312|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|    312|    }
 1108|  70.1k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|   209k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|   209k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 209k, False: 351k]
  ------------------
 1110|   209k|    state->handler = element6;
 1111|   209k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  5.36k|  case XML_TOK_OR:
  ------------------
  |  |   88|  5.36k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 5.36k, False: 555k]
  ------------------
 1113|  5.36k|    state->handler = element6;
 1114|  5.36k|    return XML_ROLE_GROUP_CHOICE;
 1115|   561k|  }
 1116|     56|  return common(state, tok);
 1117|   561k|}
xmlrole.c:notation0:
  616|  3.69k|          const ENCODING *enc) {
  617|  3.69k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.69k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  3.69k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.69k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  3.69k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.69k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  3.69k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 3, False: 3.68k]
  ------------------
  621|  1.85k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.85k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 1.85k, False: 1.83k]
  ------------------
  622|  1.85k|    return XML_ROLE_NOTATION_NONE;
  623|  1.83k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.83k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 1.83k, False: 1.85k]
  ------------------
  624|  1.83k|    state->handler = notation1;
  625|  1.83k|    return XML_ROLE_NOTATION_NAME;
  626|  3.69k|  }
  627|      3|  return common(state, tok);
  628|  3.69k|}
xmlrole.c:notation1:
  632|  3.66k|          const ENCODING *enc) {
  633|  3.66k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 3, False: 3.65k]
  ------------------
  634|  1.83k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.83k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 1.83k, False: 1.82k]
  ------------------
  635|  1.83k|    return XML_ROLE_NOTATION_NONE;
  636|  1.82k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.82k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 1.82k, False: 1.83k]
  ------------------
  637|  1.82k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.82k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 341, False: 1.48k]
  |  |  ------------------
  ------------------
  638|    341|      state->handler = notation3;
  639|    341|      return XML_ROLE_NOTATION_NONE;
  640|    341|    }
  641|  1.48k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.48k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.47k, False: 6]
  |  |  ------------------
  ------------------
  642|  1.47k|      state->handler = notation2;
  643|  1.47k|      return XML_ROLE_NOTATION_NONE;
  644|  1.47k|    }
  645|      6|    break;
  646|  3.66k|  }
  647|      9|  return common(state, tok);
  648|  3.66k|}
xmlrole.c:notation3:
  668|    677|          const ENCODING *enc) {
  669|    677|  UNUSED_P(ptr);
  ------------------
  |  |  135|    677|#  define UNUSED_P(p) (void)p
  ------------------
  670|    677|  UNUSED_P(end);
  ------------------
  |  |  135|    677|#  define UNUSED_P(p) (void)p
  ------------------
  671|    677|  UNUSED_P(enc);
  ------------------
  |  |  135|    677|#  define UNUSED_P(p) (void)p
  ------------------
  672|    677|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 2, False: 675]
  ------------------
  673|    340|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    340|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 340, False: 337]
  ------------------
  674|    340|    return XML_ROLE_NOTATION_NONE;
  675|    335|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    335|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 335, False: 342]
  ------------------
  676|    335|    state->handler = declClose;
  677|    335|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    335|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    677|  }
  680|      2|  return common(state, tok);
  681|    677|}
xmlrole.c:notation2:
  652|  2.95k|          const ENCODING *enc) {
  653|  2.95k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.95k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  2.95k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.95k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  2.95k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.95k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  2.95k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 5, False: 2.94k]
  ------------------
  657|  1.47k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.47k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 1.47k, False: 1.47k]
  ------------------
  658|  1.47k|    return XML_ROLE_NOTATION_NONE;
  659|  1.46k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.46k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 1.46k, False: 1.48k]
  ------------------
  660|  1.46k|    state->handler = notation4;
  661|  1.46k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  2.95k|  }
  663|      5|  return common(state, tok);
  664|  2.95k|}
xmlrole.c:notation4:
  685|  2.20k|          const ENCODING *enc) {
  686|  2.20k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.20k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  2.20k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.20k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  2.20k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.20k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  2.20k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 2, False: 2.19k]
  ------------------
  690|    746|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    746|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 746, False: 1.45k]
  ------------------
  691|    746|    return XML_ROLE_NOTATION_NONE;
  692|    436|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    436|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 436, False: 1.76k]
  ------------------
  693|    436|    state->handler = declClose;
  694|    436|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    436|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|  1.01k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.01k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 1.01k, False: 1.18k]
  ------------------
  697|  1.01k|    setTopLevel(state);
  ------------------
  |  |  116|  1.01k|    ((state)->handler                                                          \
  |  |  117|  1.01k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.01k, False: 0]
  |  |  ------------------
  ------------------
  698|  1.01k|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  2.20k|  }
  700|      2|  return common(state, tok);
  701|  2.20k|}
xmlrole.c:doctype5:
  319|  2.28k|         const ENCODING *enc) {
  320|  2.28k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.28k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.28k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.28k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.28k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.28k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.28k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 6, False: 2.27k]
  ------------------
  324|     47|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     47|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 47, False: 2.23k]
  ------------------
  325|     47|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.23k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.23k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.23k, False: 53]
  ------------------
  327|  2.23k|    state->handler = prolog2;
  328|  2.23k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.28k|  }
  330|      6|  return common(state, tok);
  331|  2.28k|}
xmlrole.c:prolog2:
  205|  3.50k|        const ENCODING *enc) {
  206|  3.50k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.50k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.50k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.50k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.50k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.50k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.50k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 18, False: 3.48k]
  ------------------
  210|    470|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    470|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 470, False: 3.03k]
  ------------------
  211|    470|    return XML_ROLE_NONE;
  212|    594|  case XML_TOK_PI:
  ------------------
  |  |   76|    594|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 594, False: 2.90k]
  ------------------
  213|    594|    return XML_ROLE_PI;
  214|    194|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 194, False: 3.30k]
  ------------------
  215|    194|    return XML_ROLE_COMMENT;
  216|  2.22k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.22k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.22k, False: 1.27k]
  ------------------
  217|  2.22k|    state->handler = error;
  218|  2.22k|    return XML_ROLE_INSTANCE_START;
  219|  3.50k|  }
  220|     18|  return common(state, tok);
  221|  3.50k|}
xmlrole.c:doctype3:
  284|    504|         const ENCODING *enc) {
  285|    504|  UNUSED_P(ptr);
  ------------------
  |  |  135|    504|#  define UNUSED_P(p) (void)p
  ------------------
  286|    504|  UNUSED_P(end);
  ------------------
  |  |  135|    504|#  define UNUSED_P(p) (void)p
  ------------------
  287|    504|  UNUSED_P(enc);
  ------------------
  |  |  135|    504|#  define UNUSED_P(p) (void)p
  ------------------
  288|    504|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 114, False: 390]
  ------------------
  289|    353|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    353|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 353, False: 151]
  ------------------
  290|    353|    return XML_ROLE_DOCTYPE_NONE;
  291|     37|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     37|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 37, False: 467]
  ------------------
  292|     37|    state->handler = doctype4;
  293|     37|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    504|  }
  295|    114|  return common(state, tok);
  296|    504|}
xmlrole.c:doctype4:
  300|     45|         const ENCODING *enc) {
  301|     45|  UNUSED_P(ptr);
  ------------------
  |  |  135|     45|#  define UNUSED_P(p) (void)p
  ------------------
  302|     45|  UNUSED_P(end);
  ------------------
  |  |  135|     45|#  define UNUSED_P(p) (void)p
  ------------------
  303|     45|  UNUSED_P(enc);
  ------------------
  |  |  135|     45|#  define UNUSED_P(p) (void)p
  ------------------
  304|     45|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 10, False: 35]
  ------------------
  305|     25|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     25|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 25, False: 20]
  ------------------
  306|     25|    return XML_ROLE_DOCTYPE_NONE;
  307|      8|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|      8|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 8, False: 37]
  ------------------
  308|      8|    state->handler = internalSubset;
  309|      8|    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: 43]
  ------------------
  311|      2|    state->handler = prolog2;
  312|      2|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     45|  }
  314|     10|  return common(state, tok);
  315|     45|}
xmlrole.c:doctype2:
  268|  1.45k|         const ENCODING *enc) {
  269|  1.45k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.45k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.45k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.45k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 9, False: 1.44k]
  ------------------
  273|    728|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    728|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 728, False: 725]
  ------------------
  274|    728|    return XML_ROLE_DOCTYPE_NONE;
  275|    716|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    716|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 716, False: 737]
  ------------------
  276|    716|    state->handler = doctype3;
  277|    716|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.45k|  }
  279|      9|  return common(state, tok);
  280|  1.45k|}
xmlrole.c:common:
 1225|  1.36k|common(PROLOG_STATE *state, int tok) {
 1226|  1.36k|#ifdef XML_DTD
 1227|  1.36k|  if (! state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF)
  ------------------
  |  |   95|      0|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (1227:7): [True: 0, False: 1.36k]
  |  Branch (1227:34): [True: 0, False: 0]
  ------------------
 1228|      0|    return XML_ROLE_INNER_PARAM_ENTITY_REF;
 1229|       |#else
 1230|       |  UNUSED_P(tok);
 1231|       |#endif
 1232|  1.36k|  state->handler = error;
 1233|  1.36k|  return XML_ROLE_ERROR;
 1234|  1.36k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  53.5M|                                           const char **fromLimRef) {
  328|  53.5M|  const char *fromLim = *fromLimRef;
  329|  53.5M|  size_t walked = 0;
  330|  76.3M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 76.3M, False: 7.59k]
  ------------------
  331|  76.3M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  76.3M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 3.29k, False: 76.3M]
  ------------------
  333|  76.3M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|  3.29k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 2.88k, False: 409]
  ------------------
  335|  2.88k|        fromLim += 4 - 1;
  336|  2.88k|        break;
  337|  2.88k|      } else {
  338|    409|        walked = 0;
  339|    409|      }
  340|  76.3M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 141k, False: 76.2M]
  ------------------
  341|  76.3M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|   141k|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 139k, False: 1.24k]
  ------------------
  343|   139k|        fromLim += 3 - 1;
  344|   139k|        break;
  345|   139k|      } else {
  346|  1.24k|        walked = 0;
  347|  1.24k|      }
  348|  76.2M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 22.5M, False: 53.6M]
  ------------------
  349|  76.2M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|  22.5M|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 22.5M, False: 289]
  ------------------
  351|  22.5M|        fromLim += 2 - 1;
  352|  22.5M|        break;
  353|  22.5M|      } else {
  354|    289|        walked = 0;
  355|    289|      }
  356|  53.6M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 30.8M, False: 22.8M]
  ------------------
  357|  53.6M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  30.8M|      break;
  359|  30.8M|    }
  360|  76.3M|  }
  361|  53.5M|  *fromLimRef = fromLim;
  362|  53.5M|}
XmlUtf8Encode:
 1255|  9.40k|XmlUtf8Encode(int c, char *buf) {
 1256|  9.40k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  9.40k|    min2 = 0x80,
 1259|  9.40k|    min3 = 0x800,
 1260|  9.40k|    min4 = 0x10000
 1261|  9.40k|  };
 1262|       |
 1263|  9.40k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 9.40k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  9.40k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 3.40k, False: 6.00k]
  ------------------
 1266|  3.40k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  3.40k|    return 1;
 1268|  3.40k|  }
 1269|  6.00k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 2.86k, False: 3.13k]
  ------------------
 1270|  2.86k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  2.86k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  2.86k|    return 2;
 1273|  2.86k|  }
 1274|  3.13k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 2.49k, False: 641]
  ------------------
 1275|  2.49k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  2.49k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  2.49k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  2.49k|    return 3;
 1279|  2.49k|  }
 1280|    641|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 641, False: 0]
  ------------------
 1281|    641|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|    641|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|    641|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|    641|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|    641|    return 4;
 1286|    641|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|    641|}
xmltok.c:checkCharRefNumber:
 1231|  16.6k|checkCharRefNumber(int result) {
 1232|  16.6k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 7.74k, False: 8.88k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 16.6k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 16.6k]
  ------------------
 1235|      9|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 16.6k]
  ------------------
 1236|     12|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 16.6k]
  ------------------
 1237|     15|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 3, False: 16.6k]
  ------------------
 1238|     27|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 12, False: 16.6k]
  ------------------
 1239|     30|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 16.6k]
  ------------------
 1240|     33|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 16.6k]
  ------------------
 1241|     33|    return -1;
 1242|  7.97k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 7.97k, False: 8.65k]
  ------------------
 1243|  7.97k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 119, False: 7.85k]
  ------------------
 1244|    119|      return -1;
 1245|  7.85k|    break;
 1246|  7.85k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 878, False: 15.7k]
  ------------------
 1247|    878|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 3, False: 875]
  |  Branch (1247:29): [True: 8, False: 867]
  ------------------
 1248|     11|      return -1;
 1249|    867|    break;
 1250|  16.6k|  }
 1251|  16.4k|  return result;
 1252|  16.6k|}
xmltok.c:utf8_toUtf8:
  366|  53.5M|            char **toP, const char *toLim) {
  367|  53.5M|  bool input_incomplete = false;
  368|  53.5M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  53.5M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  53.5M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  53.5M|  UNUSED_P(enc);
  ------------------
  |  |  135|  53.5M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  53.5M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 14.1k, False: 53.5M]
  ------------------
  375|  14.1k|    fromLim = *fromP + bytesStorable;
  376|  14.1k|    output_exhausted = true;
  377|  14.1k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  53.5M|  {
  381|  53.5M|    const char *const fromLimBefore = fromLim;
  382|  53.5M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  53.5M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 1.94k, False: 53.5M]
  ------------------
  384|  1.94k|      input_incomplete = true;
  385|  1.94k|    }
  386|  53.5M|  }
  387|       |
  388|  53.5M|  {
  389|  53.5M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  53.5M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  53.5M|    *fromP += bytesToCopy;
  392|  53.5M|    *toP += bytesToCopy;
  393|  53.5M|  }
  394|       |
  395|  53.5M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 14.1k, False: 53.5M]
  ------------------
  396|  14.1k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  53.5M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 53.5M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  53.5M|  else
  400|  53.5M|    return XML_CONVERT_COMPLETED;
  401|  53.5M|}
xmltok.c:utf8_isName2:
  140|  5.56k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|  5.56k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.56k|#  define UNUSED_P(p) (void)p
  ------------------
  142|  5.56k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|  5.56k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  5.56k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  5.56k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|  5.56k|}
xmltok.c:utf8_isName3:
  146|   800k|utf8_isName3(const ENCODING *enc, const char *p) {
  147|   800k|  UNUSED_P(enc);
  ------------------
  |  |  135|   800k|#  define UNUSED_P(p) (void)p
  ------------------
  148|   800k|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|   800k|  (namingBitmap                                                                \
  |  |   97|   800k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|   800k|         << 3)                                                                 \
  |  |   99|   800k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|   800k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|   800k|}
xmltok.c:isNever:
  133|     99|isNever(const ENCODING *enc, const char *p) {
  134|     99|  UNUSED_P(enc);
  ------------------
  |  |  135|     99|#  define UNUSED_P(p) (void)p
  ------------------
  135|     99|  UNUSED_P(p);
  ------------------
  |  |  135|     99|#  define UNUSED_P(p) (void)p
  ------------------
  136|     99|  return 0;
  137|     99|}
xmltok.c:utf8_isNmstrt2:
  154|  4.93k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|  4.93k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.93k|#  define UNUSED_P(p) (void)p
  ------------------
  156|  4.93k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|  4.93k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  4.93k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  4.93k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|  4.93k|}
xmltok.c:utf8_isNmstrt3:
  160|  6.60k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  6.60k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.60k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  6.60k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  6.60k|  (namingBitmap                                                                \
  |  |   97|  6.60k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  6.60k|         << 3)                                                                 \
  |  |   99|  6.60k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  6.60k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  6.60k|}
xmltok.c:utf8_isInvalid2:
  168|  2.57M|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|  2.57M|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.57M|#  define UNUSED_P(p) (void)p
  ------------------
  170|  2.57M|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|  2.57M|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 23, False: 2.57M]
  |  |  |  Branch (113:19): [True: 75, False: 2.57M]
  |  |  |  Branch (113:43): [True: 77, False: 2.57M]
  |  |  ------------------
  ------------------
  171|  2.57M|}
xmltok.c:utf8_isInvalid3:
  174|  23.7M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  23.7M|  UNUSED_P(enc);
  ------------------
  |  |  135|  23.7M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  23.7M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  23.7M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 62, False: 23.7M]
  |  |  ------------------
  |  |  117|  23.7M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 39, False: 23.7M]
  |  |  |  Branch (117:8): [True: 205k, False: 23.4M]
  |  |  |  Branch (117:24): [True: 9.00k, False: 196k]
  |  |  ------------------
  |  |  118|  23.7M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  23.7M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 41, False: 23.7M]
  |  |  |  Branch (119:8): [True: 2.89M, False: 20.8M]
  |  |  ------------------
  |  |  120|  23.7M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 12, False: 2.89M]
  |  |  |  Branch (120:31): [True: 3, False: 2.89M]
  |  |  ------------------
  |  |  121|  23.7M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 10, False: 20.8M]
  |  |  ------------------
  |  |  122|  20.8M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 16, False: 20.8M]
  |  |  |  Branch (122:22): [True: 288k, False: 20.5M]
  |  |  ------------------
  ------------------
  177|  23.7M|}
xmltok.c:utf8_isInvalid4:
  180|  87.6k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|  87.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  87.6k|#  define UNUSED_P(p) (void)p
  ------------------
  182|  87.6k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|  87.6k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 129, False: 87.5k]
  |  |  |  Branch (125:28): [True: 55, False: 87.4k]
  |  |  |  Branch (125:55): [True: 11, False: 87.4k]
  |  |  ------------------
  |  |  126|  87.6k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 12, False: 87.4k]
  |  |  ------------------
  |  |  127|  87.6k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 52, False: 87.3k]
  |  |  |  Branch (127:8): [True: 4.01k, False: 83.4k]
  |  |  ------------------
  |  |  128|  87.4k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 14, False: 4.00k]
  |  |  |  Branch (128:31): [True: 12, False: 3.99k]
  |  |  ------------------
  |  |  129|  87.4k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 6, False: 83.4k]
  |  |  ------------------
  |  |  130|  83.4k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 20, False: 83.4k]
  |  |  |  Branch (130:22): [True: 5.55k, False: 77.8k]
  |  |  ------------------
  ------------------
  183|  87.6k|}
xmltok.c:unicode_byte_type:
  595|   133M|unicode_byte_type(char hi, char lo) {
  596|   133M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 132M, False: 1.09M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|  85.6k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 85.6k, False: 133M]
  ------------------
  599|   353k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 267k, False: 133M]
  ------------------
  600|   448k|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 95.2k, False: 133M]
  ------------------
  601|   933k|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 484k, False: 133M]
  ------------------
  602|   933k|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|     89|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 89, False: 133M]
  ------------------
  605|    192|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 103, False: 133M]
  ------------------
  606|    288|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 96, False: 133M]
  ------------------
  607|    379|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 91, False: 133M]
  ------------------
  608|    379|    return BT_TRAIL;
  609|   164k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 164k, False: 133M]
  ------------------
  610|   164k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 163k, False: 273]
  ------------------
  611|    154|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 154, False: 164k]
  ------------------
  612|    273|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 119, False: 164k]
  ------------------
  613|    273|      return BT_NONXML;
  614|   164k|    }
  615|   163k|    break;
  616|   133M|  }
  617|   132M|  return BT_NONASCII;
  618|   133M|}
xmltok.c:little2_toUtf8:
  623|   283k|      char **toP, const char *toLim) {                                         \
  624|   283k|    const char *from = *fromP;                                                 \
  625|   283k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   283k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   283k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  36.1M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 35.9M, False: 277k]
  ------------------
  628|  35.9M|      int plane;                                                               \
  629|  35.9M|      unsigned char lo2;                                                       \
  630|  35.9M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  35.9M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  35.9M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  35.9M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  35.9M|      switch (hi) {                                                            \
  633|   397k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 397k, False: 35.5M]
  ------------------
  634|   397k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 357k, False: 39.3k]
  ------------------
  635|   357k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 558, False: 357k]
  ------------------
  636|    558|            *fromP = from;                                                     \
  637|    558|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    558|          }                                                                    \
  639|   357k|          *(*toP)++ = lo;                                                      \
  640|   357k|          break;                                                               \
  641|   357k|        }                                                                      \
  642|   397k|        /* fall through */                                                     \
  643|   397k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 4.52k, False: 35.8M]
  ------------------
  644|  45.7k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 1.87k, False: 35.9M]
  ------------------
  645|  54.0k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 8.28k, False: 35.8M]
  ------------------
  646|  69.7k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 15.7k, False: 35.8M]
  ------------------
  647|  72.5k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 2.80k, False: 35.9M]
  ------------------
  648|   124k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 52.3k, False: 35.8M]
  ------------------
  649|   127k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 2.64k, False: 35.9M]
  ------------------
  650|   127k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 321, False: 127k]
  ------------------
  651|    321|          *fromP = from;                                                       \
  652|    321|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    321|        }                                                                      \
  654|   127k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   127k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   127k|        break;                                                                 \
  657|  35.2M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 35.2M, False: 670k]
  ------------------
  658|  35.2M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 4.76k, False: 35.2M]
  ------------------
  659|  4.76k|          *fromP = from;                                                       \
  660|  4.76k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  4.76k|        }                                                                      \
  662|  35.2M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  35.2M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  35.2M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  35.2M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  35.2M|        break;                                                                 \
  667|  35.2M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 13.1k, False: 35.8M]
  ------------------
  668|  80.0k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 66.9k, False: 35.8M]
  ------------------
  669|  92.5k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 12.5k, False: 35.8M]
  ------------------
  670|   184k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 92.1k, False: 35.8M]
  ------------------
  671|   184k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 422, False: 184k]
  ------------------
  672|    422|          *fromP = from;                                                       \
  673|    422|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    422|        }                                                                      \
  675|   184k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 184k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   184k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   184k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   184k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   184k|        from += 2;                                                             \
  683|   184k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|   184k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|   184k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|   184k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|   184k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   184k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   184k|        break;                                                                 \
  688|  35.9M|      }                                                                        \
  689|  35.9M|    }                                                                          \
  690|   283k|    *fromP = from;                                                             \
  691|   277k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 277k]
  ------------------
  692|   277k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   277k|    else                                                                       \
  694|   277k|      return XML_CONVERT_COMPLETED;                                            \
  695|   277k|  }
xmltok.c:getEncodingIndex:
 1502|  40.1k|getEncodingIndex(const char *name) {
 1503|  40.1k|  static const char *const encodingNames[] = {
 1504|  40.1k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  40.1k|  };
 1506|  40.1k|  int i;
 1507|  40.1k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 20.0k, False: 20.1k]
  ------------------
 1508|  20.0k|    return NO_ENC;
 1509|  80.5k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 80.5k, False: 44]
  ------------------
 1510|  80.5k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 20.0k, False: 60.4k]
  ------------------
 1511|  20.0k|      return i;
 1512|     44|  return UNKNOWN_ENC;
 1513|  20.1k|}
xmltok.c:streqci:
 1005|  80.5k|streqci(const char *s1, const char *s2) {
 1006|   301k|  for (;;) {
 1007|   301k|    char c1 = *s1++;
 1008|   301k|    char c2 = *s2++;
 1009|   301k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   301k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    265|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 265, False: 301k]
  |  Branch (1009:26): [True: 265, False: 0]
  ------------------
 1010|    265|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    265|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    265|#define ASCII_a 0x61
  ------------------
 1011|   301k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   301k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 301k]
  |  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|   301k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 60.4k, False: 241k]
  ------------------
 1018|  60.4k|      return 0;
 1019|   241k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 20.0k, False: 220k]
  ------------------
 1020|  20.0k|      break;
 1021|   241k|  }
 1022|  20.0k|  return 1;
 1023|  80.5k|}
xmltok.c:initScan:
 1531|  20.0k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  20.0k|  const ENCODING **encPtr;
 1533|       |
 1534|  20.0k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 20.0k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  20.0k|  encPtr = enc->encPtr;
 1537|  20.0k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 18, False: 20.0k]
  ------------------
 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|     18|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     18|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 0, False: 18]
  |  |  ------------------
  ------------------
 1547|     18|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 18, False: 0]
  ------------------
 1548|     18|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 18]
  ------------------
 1549|     18|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 18]
  ------------------
 1550|     18|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     18|    }
 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|  20.0k|  } else {
 1564|  20.0k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|      8|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 8, False: 20.0k]
  ------------------
 1566|      8|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      8|#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: 8]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|      8|      *nextTokPtr = ptr + 2;
 1569|      8|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|      8|      return XML_TOK_BOM;
  ------------------
  |  |   79|      8|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  5.38k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 5.38k, False: 14.6k]
  ------------------
 1573|  5.38k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  5.38k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 5.38k]
  ------------------
 1574|  5.38k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  5.38k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 5.38k, False: 0]
  ------------------
 1575|  5.38k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|  5.38k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 5.38k]
  ------------------
 1576|      0|        break;
 1577|  5.38k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  5.38k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.38k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|    102|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 102, False: 19.9k]
  ------------------
 1580|    102|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|    102|#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: 102]
  |  Branch (1580:52): [True: 0, False: 0]
  ------------------
 1581|      0|        break;
 1582|    102|      *nextTokPtr = ptr + 2;
 1583|    102|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|    102|      return XML_TOK_BOM;
  ------------------
  |  |   79|    102|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|  7.43k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 7.43k, False: 12.6k]
  ------------------
 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.43k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  7.43k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 7.43k]
  ------------------
 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.43k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 7.43k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  7.43k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 7.42k, False: 14]
  ------------------
 1602|  7.42k|        *nextTokPtr = ptr + 3;
 1603|  7.42k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  7.42k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  7.42k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  7.42k|      }
 1606|     14|      break;
 1607|  7.10k|    default:
  ------------------
  |  Branch (1607:5): [True: 7.10k, False: 12.9k]
  ------------------
 1608|  7.10k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 6.06k, False: 1.03k]
  ------------------
 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.06k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  12.1k|#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.06k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  6.06k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  6.06k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.06k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  6.06k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 866, False: 173]
  ------------------
 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|    866|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    866|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 866]
  ------------------
 1630|      0|          break;
 1631|    866|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    866|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    866|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    866|      }
 1634|    173|      break;
 1635|  20.0k|    }
 1636|  20.0k|  }
 1637|    187|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|    187|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|    187|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    187|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  20.0k|}
xmltok.c:big2_toUtf8:
  623|  74.1k|      char **toP, const char *toLim) {                                         \
  624|  74.1k|    const char *from = *fromP;                                                 \
  625|  74.1k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|  74.1k|#  define UNUSED_P(p) (void)p
  ------------------
  626|  74.1k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  16.6M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 16.5M, False: 70.4k]
  ------------------
  628|  16.5M|      int plane;                                                               \
  629|  16.5M|      unsigned char lo2;                                                       \
  630|  16.5M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  16.5M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  16.5M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  16.5M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  16.5M|      switch (hi) {                                                            \
  633|  86.2k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 86.2k, False: 16.4M]
  ------------------
  634|  86.2k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 74.0k, False: 12.2k]
  ------------------
  635|  74.0k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 543, False: 73.4k]
  ------------------
  636|    543|            *fromP = from;                                                     \
  637|    543|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    543|          }                                                                    \
  639|  74.0k|          *(*toP)++ = lo;                                                      \
  640|  73.4k|          break;                                                               \
  641|  74.0k|        }                                                                      \
  642|  86.2k|        /* fall through */                                                     \
  643|  86.2k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 11.7k, False: 16.5M]
  ------------------
  644|  25.7k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 1.73k, False: 16.5M]
  ------------------
  645|  26.2k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 502, False: 16.5M]
  ------------------
  646|  35.8k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 9.56k, False: 16.5M]
  ------------------
  647|  36.3k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 556, False: 16.5M]
  ------------------
  648|  37.0k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 686, False: 16.5M]
  ------------------
  649|  38.0k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.00k, False: 16.5M]
  ------------------
  650|  38.0k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 329, False: 37.7k]
  ------------------
  651|    329|          *fromP = from;                                                       \
  652|    329|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    329|        }                                                                      \
  654|  38.0k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  37.7k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  37.7k|        break;                                                                 \
  657|  16.4M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 16.4M, False: 142k]
  ------------------
  658|  16.4M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 2.60k, False: 16.4M]
  ------------------
  659|  2.60k|          *fromP = from;                                                       \
  660|  2.60k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  2.60k|        }                                                                      \
  662|  16.4M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  16.4M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  16.4M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  16.4M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  16.4M|        break;                                                                 \
  667|  16.4M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 6.10k, False: 16.5M]
  ------------------
  668|  8.40k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 2.29k, False: 16.5M]
  ------------------
  669|  12.9k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 4.57k, False: 16.5M]
  ------------------
  670|  30.5k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 17.6k, False: 16.5M]
  ------------------
  671|  30.5k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 219, False: 30.3k]
  ------------------
  672|    219|          *fromP = from;                                                       \
  673|    219|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    219|        }                                                                      \
  675|  30.5k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 30.3k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|  30.3k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|  30.3k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|  30.3k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|  30.3k|        from += 2;                                                             \
  683|  30.3k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|  30.3k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|  30.3k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|  30.3k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|  30.3k|                     | (lo2 >> 6) | 0x80);                                     \
  686|  30.3k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|  30.3k|        break;                                                                 \
  688|  16.5M|      }                                                                        \
  689|  16.5M|    }                                                                          \
  690|  74.1k|    *fromP = from;                                                             \
  691|  70.4k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 70.4k]
  ------------------
  692|  70.4k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|  70.4k|    else                                                                       \
  694|  70.4k|      return XML_CONVERT_COMPLETED;                                            \
  695|  70.4k|  }
xmltok.c:initUpdatePosition:
 1027|     19|                   POSITION *pos) {
 1028|     19|  UNUSED_P(enc);
  ------------------
  |  |  135|     19|#  define UNUSED_P(p) (void)p
  ------------------
 1029|     19|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|     19|}
xmltok.c:doParseXmlDecl:
 1155|    315|               const ENCODING **encoding, int *standalone) {
 1156|    315|  const char *val = NULL;
 1157|    315|  const char *name = NULL;
 1158|    315|  const char *nameEnd = NULL;
 1159|    315|  ptr += 5 * enc->minBytesPerChar;
 1160|    315|  end -= 2 * enc->minBytesPerChar;
 1161|    315|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 177, False: 138]
  ------------------
 1162|    315|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 14, False: 124]
  ------------------
 1163|    191|    *badPtr = ptr;
 1164|    191|    return 0;
 1165|    191|  }
 1166|    124|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    124|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 3, False: 121]
  ------------------
 1167|      3|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 3, False: 0]
  ------------------
 1168|      3|      *badPtr = name;
 1169|      3|      return 0;
 1170|      3|    }
 1171|    121|  } else {
 1172|    121|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 121, False: 0]
  ------------------
 1173|    121|      *versionPtr = val;
 1174|    121|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 121, False: 0]
  ------------------
 1175|    121|      *versionEndPtr = ptr;
 1176|    121|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 18, False: 103]
  ------------------
 1177|     18|      *badPtr = ptr;
 1178|     18|      return 0;
 1179|     18|    }
 1180|    103|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 5, False: 98]
  ------------------
 1181|      5|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 5]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|      5|      return 1;
 1187|      5|    }
 1188|    103|  }
 1189|     98|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     98|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 53, False: 45]
  |  |  ------------------
  ------------------
 1190|     53|    int c = toAscii(enc, val, end);
 1191|     53|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     53|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     27|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     26|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     23|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 27, False: 26]
  |  Branch (1191:28): [True: 27, False: 0]
  |  Branch (1191:48): [True: 23, False: 3]
  |  Branch (1191:64): [True: 22, False: 1]
  ------------------
 1192|      4|      *badPtr = val;
 1193|      4|      return 0;
 1194|      4|    }
 1195|     49|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 49, False: 0]
  ------------------
 1196|     49|      *encodingName = val;
 1197|     49|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 49, False: 0]
  ------------------
 1198|     49|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     49|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 9, False: 40]
  ------------------
 1200|      9|      *badPtr = ptr;
 1201|      9|      return 0;
 1202|      9|    }
 1203|     40|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 38, False: 2]
  ------------------
 1204|     38|      return 1;
 1205|     40|  }
 1206|     47|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|     94|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 5, False: 42]
  ------------------
 1207|     47|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 42]
  ------------------
 1208|      5|    *badPtr = name;
 1209|      5|    return 0;
 1210|      5|  }
 1211|     42|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     42|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 28, False: 14]
  |  |  ------------------
  ------------------
 1212|     28|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 28, False: 0]
  ------------------
 1213|     28|      *standalone = 1;
 1214|     28|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     14|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 13, False: 1]
  |  |  ------------------
  ------------------
 1215|     13|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 13, False: 0]
  ------------------
 1216|     13|      *standalone = 0;
 1217|     13|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    238|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 197, False: 41]
  ------------------
 1222|    197|    ptr += enc->minBytesPerChar;
 1223|     41|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 6, False: 35]
  ------------------
 1224|      6|    *badPtr = ptr;
 1225|      6|    return 0;
 1226|      6|  }
 1227|     35|  return 1;
 1228|     41|}
xmltok.c:parsePseudoAttribute:
 1061|    485|                     const char **valPtr, const char **nextTokPtr) {
 1062|    485|  int c;
 1063|    485|  char open;
 1064|    485|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 42, False: 443]
  ------------------
 1065|     42|    *namePtr = NULL;
 1066|     42|    return 1;
 1067|     42|  }
 1068|    443|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 3, False: 440]
  ------------------
 1069|      3|    *nextTokPtr = ptr;
 1070|      3|    return 0;
 1071|      3|  }
 1072|    710|  do {
 1073|    710|    ptr += enc->minBytesPerChar;
 1074|    710|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 270, False: 440]
  ------------------
 1075|    440|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 15, False: 425]
  ------------------
 1076|     15|    *namePtr = NULL;
 1077|     15|    return 1;
 1078|     15|  }
 1079|    425|  *namePtr = ptr;
 1080|  2.64k|  for (;;) {
 1081|  2.64k|    c = toAscii(enc, ptr, end);
 1082|  2.64k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 46, False: 2.59k]
  ------------------
 1083|     46|      *nextTokPtr = ptr;
 1084|     46|      return 0;
 1085|     46|    }
 1086|  2.59k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.59k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 341, False: 2.25k]
  ------------------
 1087|    341|      *nameEndPtr = ptr;
 1088|    341|      break;
 1089|    341|    }
 1090|  2.25k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 38, False: 2.21k]
  ------------------
 1091|     38|      *nameEndPtr = ptr;
 1092|    342|      do {
 1093|    342|        ptr += enc->minBytesPerChar;
 1094|    342|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 304, False: 38]
  ------------------
 1095|     38|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     38|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 31, False: 7]
  ------------------
 1096|     31|        *nextTokPtr = ptr;
 1097|     31|        return 0;
 1098|     31|      }
 1099|      7|      break;
 1100|     38|    }
 1101|  2.21k|    ptr += enc->minBytesPerChar;
 1102|  2.21k|  }
 1103|    348|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 9, False: 339]
  ------------------
 1104|      9|    *nextTokPtr = ptr;
 1105|      9|    return 0;
 1106|      9|  }
 1107|    339|  ptr += enc->minBytesPerChar;
 1108|    339|  c = toAscii(enc, ptr, end);
 1109|    732|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 393, False: 339]
  ------------------
 1110|    393|    ptr += enc->minBytesPerChar;
 1111|    393|    c = toAscii(enc, ptr, end);
 1112|    393|  }
 1113|    339|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    678|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     90|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 90, False: 249]
  |  Branch (1113:26): [True: 33, False: 57]
  ------------------
 1114|     33|    *nextTokPtr = ptr;
 1115|     33|    return 0;
 1116|     33|  }
 1117|    306|  open = (char)c;
 1118|    306|  ptr += enc->minBytesPerChar;
 1119|    306|  *valPtr = ptr;
 1120|  2.24k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.24k|    c = toAscii(enc, ptr, end);
 1122|  2.24k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 224, False: 2.01k]
  ------------------
 1123|    224|      break;
 1124|  2.01k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  2.01k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    590|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.43k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    479|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 590, False: 1.42k]
  |  Branch (1124:28): [True: 589, False: 1]
  |  Branch (1124:48): [True: 479, False: 951]
  |  Branch (1124:64): [True: 277, False: 202]
  ------------------
 1125|  2.01k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.15k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    485|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  2.89k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 485, False: 668]
  |  Branch (1125:31): [True: 278, False: 207]
  |  Branch (1125:48): [True: 634, False: 241]
  ------------------
 1126|  2.01k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.65k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    280|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 280, False: 354]
  |  Branch (1126:32): [True: 82, False: 198]
  ------------------
 1127|     82|      *nextTokPtr = ptr;
 1128|     82|      return 0;
 1129|     82|    }
 1130|  2.01k|  }
 1131|    224|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    224|  return 1;
 1133|    306|}
xmltok.c:toAscii:
 1033|  7.40k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  7.40k|  char buf[1];
 1035|  7.40k|  char *p = buf;
 1036|  7.40k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  7.40k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  7.40k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 222, False: 7.18k]
  ------------------
 1038|    222|    return -1;
 1039|  7.18k|  else
 1040|  7.18k|    return buf[0];
 1041|  7.40k|}
xmltok.c:isSpace:
 1044|  4.72k|isSpace(int c) {
 1045|  4.72k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.07k, False: 1.64k]
  ------------------
 1046|    742|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 742, False: 3.97k]
  ------------------
 1047|  1.06k|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 322, False: 4.39k]
  ------------------
 1048|  1.55k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 493, False: 4.22k]
  ------------------
 1049|  1.64k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 85, False: 4.63k]
  ------------------
 1050|  1.64k|    return 1;
 1051|  4.72k|  }
 1052|  3.07k|  return 0;
 1053|  4.72k|}

xmltok.c:normal_prologTok:
 1018|  5.87M|                  const char **nextTokPtr) {
 1019|  5.87M|  int tok;
 1020|  5.87M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 1.16k, False: 5.87M]
  ------------------
 1021|  1.16k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.16k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  5.87M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  5.87M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|      0|    size_t n = end - ptr;
 1024|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1024:9): [True: 0, False: 0]
  ------------------
 1025|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1026|      0|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 0, False: 0]
  ------------------
 1027|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|      0|      end = ptr + n;
 1029|      0|    }
 1030|      0|  }
 1031|  5.87M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.87M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.87M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  4.28k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 4.28k, False: 5.86M]
  ------------------
 1033|  4.28k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.28k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.28k|#  define MINBPC(enc) 1
  ------------------
 1034|  18.1k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 18.1k, False: 5.85M]
  ------------------
 1035|  18.1k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  18.1k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  18.1k|#  define MINBPC(enc) 1
  ------------------
 1036|  32.0k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 32.0k, False: 5.83M]
  ------------------
 1037|  32.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  32.0k|#  define MINBPC(enc) 1
  ------------------
 1038|  32.0k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  32.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  32.0k|    {                                                                          \
  |  |  |  |  135|  32.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  32.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  32.0k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 32.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  32.0k|    }
  |  |  ------------------
  ------------------
 1039|  32.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  32.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  32.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 6, False: 32.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  25.1k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 25.1k, False: 6.86k]
  ------------------
 1041|  25.1k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  25.1k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  25.1k|#  define MINBPC(enc) 1
  ------------------
 1042|  3.00k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.00k, False: 29.0k]
  ------------------
 1043|  3.00k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.00k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.00k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.77k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.77k, False: 29.2k]
  ------------------
 1045|  3.77k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.00k, False: 31.0k]
  ------------------
 1046|  3.77k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 32.0k]
  ------------------
 1047|  3.81k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 35, False: 32.0k]
  ------------------
 1048|  3.84k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 34, False: 32.0k]
  ------------------
 1049|  3.85k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 32.0k]
  ------------------
 1050|  3.85k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  3.85k|#  define MINBPC(enc) 1
  ------------------
 1051|  3.85k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.85k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  32.0k|    }
 1053|      6|    *nextTokPtr = ptr;
 1054|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
 1055|  32.0k|  }
 1056|  49.9k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 49.9k, False: 5.82M]
  ------------------
 1057|  49.9k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|  49.9k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 221, False: 49.6k]
  ------------------
 1058|    221|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    221|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    221|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    221|    }
 1062|       |    /* fall through */
 1063|   189k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 139k, False: 5.73M]
  ------------------
 1064|   216k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 27.3k, False: 5.84M]
  ------------------
 1065|   223k|    for (;;) {
 1066|   223k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   223k|#  define MINBPC(enc) 1
  ------------------
 1067|   223k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   223k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   223k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   223k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 509, False: 222k]
  ------------------
 1068|    509|        break;
 1069|   222k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   222k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   222k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  1.86k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.86k, False: 220k]
  ------------------
 1071|  3.45k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.59k, False: 220k]
  ------------------
 1072|  3.45k|        break;
 1073|  2.70k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 2.70k, False: 219k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  2.70k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|  2.70k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 2.69k, False: 10]
  ------------------
 1076|  2.69k|          break;
 1077|       |        /* fall through */
 1078|   216k|      default:
  ------------------
  |  Branch (1078:7): [True: 216k, False: 6.16k]
  ------------------
 1079|   216k|        *nextTokPtr = ptr;
 1080|   216k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   216k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   222k|      }
 1082|   222k|    }
 1083|    509|    *nextTokPtr = ptr;
 1084|    509|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    509|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  4.72k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 4.72k, False: 5.86M]
  ------------------
 1086|  4.72k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.72k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.72k|#  define MINBPC(enc) 1
  ------------------
 1087|   203k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 203k, False: 5.66M]
  ------------------
 1088|   203k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   203k|#  define MINBPC(enc) 1
  ------------------
 1089|   203k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|   203k|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.84k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.84k, False: 5.86M]
  ------------------
 1091|  2.84k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.84k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.84k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.84k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|  1.03k|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 1.03k, False: 5.86M]
  ------------------
 1094|  1.03k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.03k|#  define MINBPC(enc) 1
  ------------------
 1095|  1.03k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.03k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.03k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.03k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  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)) {
  ------------------
  |  |  300|  1.02k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 15, False: 1.01k]
  |  |  ------------------
  ------------------
 1098|     15|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     15|    {                                                                          \
  |  |  135|     15|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     15|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     15|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 14]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     15|    }
  ------------------
 1099|     14|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     14|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 13]
  |  |  ------------------
  ------------------
 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|     14|    }
 1104|  1.02k|    *nextTokPtr = ptr;
 1105|  1.02k|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|  1.02k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.72M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.72M, False: 1.14M]
  ------------------
 1107|  4.72M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.72M|#  define MINBPC(enc) 1
  ------------------
 1108|  4.72M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.72M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|   345k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 345k, False: 5.52M]
  ------------------
 1110|   345k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   345k|#  define MINBPC(enc) 1
  ------------------
 1111|   345k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   345k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   345k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   345k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 28, False: 345k]
  ------------------
 1112|     28|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     28|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|   345k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   345k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   345k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 4, False: 345k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  35.7k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 35.7k, False: 310k]
  ------------------
 1115|  35.7k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  35.7k|#  define MINBPC(enc) 1
  ------------------
 1116|  35.7k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  35.7k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  26.8k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 26.8k, False: 318k]
  ------------------
 1118|  26.8k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  26.8k|#  define MINBPC(enc) 1
  ------------------
 1119|  26.8k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  26.8k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  69.6k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 69.6k, False: 276k]
  ------------------
 1121|  69.6k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  69.6k|#  define MINBPC(enc) 1
  ------------------
 1122|  69.6k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  69.6k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|  5.08k|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 5.08k, False: 340k]
  ------------------
 1124|  6.63k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 1.55k, False: 344k]
  ------------------
 1125|  7.27k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 641, False: 345k]
  ------------------
 1126|  8.72k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 1.44k, False: 344k]
  ------------------
 1127|   212k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 203k, False: 142k]
  ------------------
 1128|   212k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 247, False: 345k]
  ------------------
 1129|   213k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.19k, False: 344k]
  ------------------
 1130|   213k|      *nextTokPtr = ptr;
 1131|   213k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|   213k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|   345k|    }
 1133|      4|    *nextTokPtr = ptr;
 1134|      4|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
 1135|  6.51k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 6.51k, False: 5.86M]
  ------------------
 1136|  6.51k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.51k|#  define MINBPC(enc) 1
  ------------------
 1137|  6.51k|    return XML_TOK_OR;
  ------------------
  |  |   88|  6.51k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  21.0k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 21.0k, False: 5.84M]
  ------------------
 1139|  21.0k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  21.0k|#  define MINBPC(enc) 1
  ------------------
 1140|  21.0k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  21.0k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  7.87k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 7.87k, False: 5.86M]
  ------------------
 1142|  7.87k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  7.87k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  7.87k|#  define MINBPC(enc) 1
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|  2.24k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      2|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 688, False: 5.86M]
  |  |  ------------------
  |  | 1145|    688|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 683]
  |  |  ------------------
  |  | 1146|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    683|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    683|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    683|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 13, False: 670]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     13|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     13|    }                                                                          \
  |  | 1151|    683|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    670|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    670|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 471, False: 199]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    471|      ptr += n;                                                                \
  |  | 1153|    471|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    471|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    471|      break;                                                                   \
  |  | 1155|    471|    }                                                                          \
  |  | 1156|    670|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    199|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    199|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 197, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    197|      ptr += n;                                                                \
  |  | 1158|    197|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    197|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    197|      break;                                                                   \
  |  | 1160|    197|    }                                                                          \
  |  | 1161|    199|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      2|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  1.64k|    LEAD_CASE(3)
  ------------------
  |  | 1144|     19|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 486, False: 5.86M]
  |  |  ------------------
  |  | 1145|    486|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 4, False: 482]
  |  |  ------------------
  |  | 1146|     19|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    482|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    482|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    482|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 32, False: 450]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     32|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     32|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     32|    }                                                                          \
  |  | 1151|    482|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    450|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    450|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 228, False: 222]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    228|      ptr += n;                                                                \
  |  | 1153|    228|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    228|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    228|      break;                                                                   \
  |  | 1155|    228|    }                                                                          \
  |  | 1156|    450|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    222|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    222|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 203, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    203|      ptr += n;                                                                \
  |  | 1158|    203|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    203|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    203|      break;                                                                   \
  |  | 1160|    203|    }                                                                          \
  |  | 1161|    222|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     19|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    149|    LEAD_CASE(4)
  ------------------
  |  | 1144|     17|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 59, False: 5.87M]
  |  |  ------------------
  |  | 1145|     59|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 3, False: 56]
  |  |  ------------------
  |  | 1146|     17|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     56|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     56|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     56|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 39, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     39|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     39|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     39|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     39|    }                                                                          \
  |  | 1151|     56|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     17|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     17|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     17|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     17|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|   249k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 249k, False: 5.62M]
  ------------------
 1168|   275k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 25.6k, False: 5.84M]
  ------------------
 1169|   275k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   275k|#define XML_TOK_NAME 18
  ------------------
 1170|   275k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   275k|#  define MINBPC(enc) 1
  ------------------
 1171|   275k|    break;
 1172|    907|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 907, False: 5.86M]
  ------------------
 1173|  1.15k|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 248, False: 5.87M]
  ------------------
 1174|  1.52k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 371, False: 5.86M]
  ------------------
 1175|  1.52k|#  ifdef XML_NS
 1176|  1.52k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 5.87M]
  ------------------
 1177|  1.52k|#  endif
 1178|  1.52k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.52k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.52k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.52k|#  define MINBPC(enc) 1
  ------------------
 1180|  1.52k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 5.87M]
  ------------------
 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|     40|  default:
  ------------------
  |  Branch (1193:3): [True: 40, False: 5.87M]
  ------------------
 1194|     40|    *nextTokPtr = ptr;
 1195|     40|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     40|#define XML_TOK_INVALID 0
  ------------------
 1196|  5.87M|  }
 1197|   796k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|   796k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   796k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   796k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  1.91M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   518k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 796k]
  |  |  ------------------
  |  |   82|   518k|    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|   518k|    /* fall through */                                                         \
  |  |   87|   518k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 381k, False: 415k]
  |  |  ------------------
  |  |   88|   507k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 125k, False: 671k]
  |  |  ------------------
  |  |   89|   513k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 6.79k, False: 790k]
  |  |  ------------------
  |  |   90|   514k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 452, False: 796k]
  |  |  ------------------
  |  |   91|   518k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 3.88k, False: 793k]
  |  |  ------------------
  |  |   92|   518k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   518k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   518k|    break;                                                                     \
  |  |   94|   518k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    216|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 237, False: 796k]
  |  |  |  |  ------------------
  |  |  |  |   71|    237|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 235]
  |  |  |  |  ------------------
  |  |  |  |   72|    216|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    235|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    470|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    235|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 18, False: 217]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    217|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    217|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 216]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|    235|    ptr += n;                                                                  \
  |  |  |  |   78|    216|    break;
  |  |  ------------------
  |  |   95|    471|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    461|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 471, False: 796k]
  |  |  |  |  ------------------
  |  |  |  |   71|    471|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 468]
  |  |  |  |  ------------------
  |  |  |  |   72|    461|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    468|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    936|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    468|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 463]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    463|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    463|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 461]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    468|    ptr += n;                                                                  \
  |  |  |  |   78|    461|    break;
  |  |  ------------------
  |  |   96|    461|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 796k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, 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|     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;
  |  |  ------------------
  ------------------
 1200|  2.36k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 2.36k, False: 794k]
  ------------------
 1201|   213k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 210k, False: 586k]
  ------------------
 1202|   213k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 257, False: 796k]
  ------------------
 1203|   216k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 3.38k, False: 793k]
  ------------------
 1204|   219k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.72k, False: 794k]
  ------------------
 1205|   219k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 7, False: 796k]
  ------------------
 1206|   245k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 26.1k, False: 770k]
  ------------------
 1207|   265k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 19.3k, False: 777k]
  ------------------
 1208|   275k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 10.0k, False: 786k]
  ------------------
 1209|   275k|      *nextTokPtr = ptr;
 1210|   275k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 796k]
  ------------------
 1213|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1214|      0|      switch (tok) {
  ------------------
  |  Branch (1214:15): [True: 0, False: 0]
  ------------------
 1215|      0|      case XML_TOK_NAME:
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
 1217|      0|        tok = XML_TOK_PREFIXED_NAME;
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
 1218|      0|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|      0|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1219|      0|          CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|      0|    /* fall through */                                                         \
  |  |   87|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   89|      0|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   90|      0|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|      0|    break;                                                                     \
  |  |   94|      0|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      0|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      0|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      0|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      0|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1220|      0|        default:
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|          tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1222|      0|          break;
 1223|      0|        }
 1224|      0|        break;
 1225|      0|      case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1225:7): [True: 0, False: 0]
  ------------------
 1226|      0|        tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1227|      0|        break;
 1228|      0|      }
 1229|      0|      break;
 1230|      0|#  endif
 1231|  1.70k|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 1.70k, False: 795k]
  ------------------
 1232|  1.70k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  1.70k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 1.70k]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|  1.70k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.70k|#  define MINBPC(enc) 1
  ------------------
 1237|  1.70k|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|  1.70k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    508|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 508, False: 796k]
  ------------------
 1239|    508|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    508|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 507]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    507|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    507|#  define MINBPC(enc) 1
  ------------------
 1244|    507|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    507|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    619|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 619, False: 796k]
  ------------------
 1246|    619|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    619|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 618]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    618|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    618|#  define MINBPC(enc) 1
  ------------------
 1251|    618|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    618|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     34|    default:
  ------------------
  |  Branch (1252:5): [True: 34, False: 796k]
  ------------------
 1253|     34|      *nextTokPtr = ptr;
 1254|     34|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
 1255|   796k|    }
 1256|   796k|  }
 1257|    219|  return -tok;
 1258|   278k|}
xmltok.c:normal_scanLit:
  984|  22.4k|                const char **nextTokPtr) {
  985|  11.2M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  11.2M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  11.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.2M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  11.2M|    switch (t) {
  988|   595k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|   296k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   296k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 296k, False: 10.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|   296k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 296k]
  |  |  |  |  ------------------
  |  |  |  |   51|   296k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   296k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   296k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   296k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 296k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     13|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     13|    }                                                                          \
  |  |  |  |   56|   296k|    ptr += n;                                                                  \
  |  |  |  |   57|   296k|    break;
  |  |  ------------------
  |  |   61|   296k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    842|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 846, False: 11.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|    846|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 845]
  |  |  |  |  ------------------
  |  |  |  |   51|    842|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    845|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    845|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    845|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 842]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|    845|    ptr += n;                                                                  \
  |  |  |  |   57|    842|    break;
  |  |  ------------------
  |  |   62|    842|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    453|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 470, False: 11.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|    470|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 468]
  |  |  |  |  ------------------
  |  |  |  |   51|    453|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    468|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    468|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    468|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 453]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     15|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     15|    }                                                                          \
  |  |  |  |   56|    468|    ptr += n;                                                                  \
  |  |  |  |   57|    453|    break;
  |  |  ------------------
  |  |   63|    453|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 6, False: 11.2M]
  |  |  ------------------
  |  |   64|      9|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 3, False: 11.2M]
  |  |  ------------------
  |  |   65|     12|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 11.2M]
  |  |  ------------------
  |  |   66|     12|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|   569k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 569k, False: 10.6M]
  ------------------
  990|   587k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 18.4k, False: 11.2M]
  ------------------
  991|   587k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   587k|#  define MINBPC(enc) 1
  ------------------
  992|   587k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 565k, False: 22.2k]
  ------------------
  993|   565k|        break;
  994|  22.2k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  22.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  22.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  22.2k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 22.2k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  22.2k|      *nextTokPtr = ptr;
  997|  22.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  22.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  22.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  3.30k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 3.30k, False: 18.9k]
  ------------------
  999|  9.94k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 6.64k, False: 15.6k]
  ------------------
 1000|  11.3k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.36k, False: 20.9k]
  ------------------
 1001|  22.2k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 10.8k, False: 11.4k]
  ------------------
 1002|  22.2k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 24, False: 22.2k]
  ------------------
 1003|  22.2k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 67, False: 22.2k]
  ------------------
 1004|  22.2k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  22.2k|#define XML_TOK_LITERAL 27
  ------------------
 1005|      1|      default:
  ------------------
  |  Branch (1005:7): [True: 1, False: 22.2k]
  ------------------
 1006|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1007|  22.2k|      }
 1008|  10.3M|    default:
  ------------------
  |  Branch (1008:5): [True: 10.3M, False: 885k]
  ------------------
 1009|  10.3M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.3M|#  define MINBPC(enc) 1
  ------------------
 1010|  10.3M|      break;
 1011|  11.2M|    }
 1012|  11.2M|  }
 1013|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  22.4k|}
xmltok.c:normal_scanDecl:
  183|  25.1k|                 const char **nextTokPtr) {
  184|  25.1k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  25.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  25.1k|    {                                                                          \
  |  |  |  |  135|  25.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  25.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  25.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 25.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  25.1k|    }
  |  |  ------------------
  ------------------
  185|  25.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  25.1k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  25.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|    700|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 700, False: 24.4k]
  ------------------
  187|    700|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    700|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    700|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 25.1k]
  ------------------
  189|      1|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
  190|      1|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      1|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|  1.19k|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 1.19k, False: 23.9k]
  ------------------
  192|  24.4k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 23.2k, False: 1.90k]
  ------------------
  193|  24.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  24.4k|#  define MINBPC(enc) 1
  ------------------
  194|  24.4k|    break;
  195|      5|  default:
  ------------------
  |  Branch (195:3): [True: 5, False: 25.1k]
  ------------------
  196|      5|    *nextTokPtr = ptr;
  197|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  198|  25.1k|  }
  199|   165k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   165k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   165k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   165k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|      7|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 7, False: 165k]
  ------------------
  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: 2, False: 5]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|      7|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|      5|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|      5|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      5|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 1, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 4]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 4]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 4]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 4]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|      5|      }
  212|       |      /* fall through */
  213|  8.06k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 8.06k, False: 157k]
  ------------------
  214|  17.5k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 9.47k, False: 156k]
  ------------------
  215|  24.4k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 6.88k, False: 158k]
  ------------------
  216|  24.4k|      *nextTokPtr = ptr;
  217|  24.4k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  24.4k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   125k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 125k, False: 40.4k]
  ------------------
  219|   141k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 16.0k, False: 149k]
  ------------------
  220|   141k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   141k|#  define MINBPC(enc) 1
  ------------------
  221|   141k|      break;
  222|     13|    default:
  ------------------
  |  Branch (222:5): [True: 13, False: 165k]
  ------------------
  223|     13|      *nextTokPtr = ptr;
  224|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  225|   165k|    }
  226|   165k|  }
  227|     39|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  24.4k|}
xmltok.c:normal_scanComment:
  146|  1.20k|                    const char **nextTokPtr) {
  147|  1.20k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.20k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.20k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.19k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.19k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.19k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 13, False: 1.18k]
  ------------------
  149|     13|      *nextTokPtr = ptr;
  150|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  151|     13|    }
  152|  1.18k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.18k|#  define MINBPC(enc) 1
  ------------------
  153|  2.47M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  2.47M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.47M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.47M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  4.92M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.86k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.84k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.86k, False: 2.46M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.86k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 1.85k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.84k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.85k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.85k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.85k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 1.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|  1.85k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.84k|    break;
  |  |  ------------------
  |  |   61|  2.45M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.45M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.45M, False: 13.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.45M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.45M]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.45M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.45M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.45M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.45M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 2.45M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  2.45M|    ptr += n;                                                                  \
  |  |  |  |   57|  2.45M|    break;
  |  |  ------------------
  |  |   62|  2.45M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.80k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.80k, False: 2.46M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.80k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 1.80k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.80k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.80k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.80k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.80k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  1.80k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.80k|    break;
  |  |  ------------------
  |  |   63|  1.80k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 5, False: 2.47M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 2.47M]
  |  |  ------------------
  |  |   65|     11|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 2.47M]
  |  |  ------------------
  |  |   66|     11|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     11|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.50k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.50k, False: 2.46M]
  ------------------
  157|  1.50k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.50k|#  define MINBPC(enc) 1
  ------------------
  158|  1.50k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.50k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.50k|    {                                                                          \
  |  |  |  |  135|  1.50k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.50k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.50k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.50k|    }
  |  |  ------------------
  ------------------
  159|  1.50k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.50k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.06k, False: 444]
  |  |  ------------------
  ------------------
  160|  1.06k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.06k|#  define MINBPC(enc) 1
  ------------------
  161|  1.06k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.06k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.06k|    {                                                                          \
  |  |  |  |  135|  1.06k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.06k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.06k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.06k|    }
  |  |  ------------------
  ------------------
  162|  1.05k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.05k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 12, False: 1.04k]
  ------------------
  163|     12|            *nextTokPtr = ptr;
  164|     12|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  165|     12|          }
  166|  1.04k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.04k|#  define MINBPC(enc) 1
  ------------------
  167|  1.04k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.04k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.05k|        }
  169|    444|        break;
  170|  8.54k|      default:
  ------------------
  |  Branch (170:7): [True: 8.54k, False: 2.46M]
  ------------------
  171|  8.54k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  8.54k|#  define MINBPC(enc) 1
  ------------------
  172|  8.54k|        break;
  173|  2.47M|      }
  174|  2.47M|    }
  175|  1.18k|  }
  176|     98|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     98|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.20k|}
xmltok.c:normal_scanPi:
  277|  6.37k|               const char **nextTokPtr) {
  278|  6.37k|  int tok;
  279|  6.37k|  const char *target = ptr;
  280|  6.37k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.37k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.37k|    {                                                                          \
  |  |  |  |  135|  6.37k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.37k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.37k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 6.36k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  6.37k|    }
  |  |  ------------------
  ------------------
  281|  6.36k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.36k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.36k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  6.50k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.53k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 6.36k]
  |  |  ------------------
  |  |  111|  5.53k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  5.53k|    /* fall through */                                                         \
  |  |  116|  5.53k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.86k, False: 1.50k]
  |  |  ------------------
  |  |  117|  5.53k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 676, False: 5.68k]
  |  |  ------------------
  |  |  118|  5.53k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.53k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  5.53k|    break;                                                                     \
  |  |  120|  5.53k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    405|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 408, False: 5.95k]
  |  |  |  |  ------------------
  |  |  |  |  100|    408|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 407]
  |  |  |  |  ------------------
  |  |  |  |  101|    405|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    407|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    814|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    407|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 406]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    406|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    406|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 405]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    407|    ptr += n;                                                                  \
  |  |  |  |  107|    405|    break;
  |  |  ------------------
  |  |  121|    406|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    399|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 406, False: 5.95k]
  |  |  |  |  ------------------
  |  |  |  |  100|    406|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 404]
  |  |  |  |  ------------------
  |  |  |  |  101|    399|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    404|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    808|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    404|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 400]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    400|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    400|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 399]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    404|    ptr += n;                                                                  \
  |  |  |  |  107|    399|    break;
  |  |  ------------------
  |  |  122|    399|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 6.35k]
  |  |  |  |  ------------------
  |  |  |  |  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: 4, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      5|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      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;
  |  |  ------------------
  ------------------
  283|      2|  default:
  ------------------
  |  Branch (283:3): [True: 2, False: 6.36k]
  ------------------
  284|      2|    *nextTokPtr = ptr;
  285|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  286|  6.36k|  }
  287|  19.4k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  19.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  19.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  19.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  39.7k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  9.75k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 19.4k]
  |  |  ------------------
  |  |   82|  9.75k|    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|  9.75k|    /* fall through */                                                         \
  |  |   87|  9.75k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 6.64k, False: 12.8k]
  |  |  ------------------
  |  |   88|  8.19k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.55k, False: 17.9k]
  |  |  ------------------
  |  |   89|  8.73k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 542, False: 18.9k]
  |  |  ------------------
  |  |   90|  9.15k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 417, False: 19.0k]
  |  |  ------------------
  |  |   91|  9.75k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 602, False: 18.8k]
  |  |  ------------------
  |  |   92|  9.75k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  9.75k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  9.75k|    break;                                                                     \
  |  |   94|  9.75k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    347|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 366, False: 19.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|    366|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 365]
  |  |  |  |  ------------------
  |  |  |  |   72|    347|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    365|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    730|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    365|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 358]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    358|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    358|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 11, False: 347]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|    365|    ptr += n;                                                                  \
  |  |  |  |   78|    347|    break;
  |  |  ------------------
  |  |   95|  3.12k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  3.08k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 3.12k, False: 16.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|  3.12k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 3.12k]
  |  |  |  |  ------------------
  |  |  |  |   72|  3.08k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  3.12k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.24k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.12k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  3.11k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.11k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 30, False: 3.08k]
  |  |  |  |  ------------------
  |  |  |  |   74|     33|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     33|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     33|    }                                                                          \
  |  |  |  |   77|  3.12k|    ptr += n;                                                                  \
  |  |  |  |   78|  3.08k|    break;
  |  |  ------------------
  |  |   96|  3.08k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 19.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 20]
  |  |  |  |  ------------------
  |  |  |  |   72|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     40|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     20|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     10|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    987|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 987, False: 18.4k]
  ------------------
  291|  1.28k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 300, False: 19.1k]
  ------------------
  292|  2.72k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.44k, False: 18.0k]
  ------------------
  293|  2.72k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  2.72k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.72k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.72k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.72k|#  define MINBPC(enc) 1
  ------------------
  298|  1.23M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  1.23M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.23M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.23M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  2.44M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.02k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.01k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.02k, False: 1.23M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.02k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 1.01k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.01k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.01k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.01k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.01k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  1.01k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.01k|    break;
  |  |  ------------------
  |  |   61|  1.22M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.22M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.22M, False: 16.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.22M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 1.22M]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.22M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.22M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.22M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.22M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.22M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  1.22M|    ptr += n;                                                                  \
  |  |  |  |   57|  1.22M|    break;
  |  |  ------------------
  |  |   62|  1.22M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    911|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 920, False: 1.23M]
  |  |  |  |  ------------------
  |  |  |  |   50|    920|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 918]
  |  |  |  |  ------------------
  |  |  |  |   51|    911|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    918|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    918|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    918|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 911]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|    918|    ptr += n;                                                                  \
  |  |  |  |   57|    911|    break;
  |  |  ------------------
  |  |   63|    911|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 5, False: 1.23M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 1.23M]
  |  |  ------------------
  |  |   65|      8|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 1, False: 1.23M]
  |  |  ------------------
  |  |   66|      8|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      8|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.21k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.21k, False: 1.23M]
  ------------------
  302|  3.21k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.21k|#  define MINBPC(enc) 1
  ------------------
  303|  3.21k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.21k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.21k|    {                                                                          \
  |  |  |  |  135|  3.21k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.21k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.21k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 3.20k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  3.21k|    }
  |  |  ------------------
  ------------------
  304|  3.20k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.20k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2.57k, False: 633]
  |  |  ------------------
  ------------------
  305|  2.57k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.57k|#  define MINBPC(enc) 1
  ------------------
  306|  2.57k|            return tok;
  307|  2.57k|          }
  308|    633|          break;
  309|  11.7k|        default:
  ------------------
  |  Branch (309:9): [True: 11.7k, False: 1.22M]
  ------------------
  310|  11.7k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  11.7k|#  define MINBPC(enc) 1
  ------------------
  311|  11.7k|          break;
  312|  1.23M|        }
  313|  1.23M|      }
  314|    121|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    121|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.46k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.46k, False: 16.0k]
  ------------------
  316|  3.46k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.46k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 3.46k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  3.46k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.46k|#  define MINBPC(enc) 1
  ------------------
  321|  3.46k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.46k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.46k|    {                                                                          \
  |  |  |  |  135|  3.46k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.46k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.46k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 31, False: 3.43k]
  |  |  |  |  ------------------
  |  |  |  |  136|     31|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     31|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     31|      }                                                                        \
  |  |  |  |  138|  3.46k|    }
  |  |  ------------------
  ------------------
  322|  3.43k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.43k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.41k, False: 14]
  |  |  ------------------
  ------------------
  323|  3.41k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.41k|#  define MINBPC(enc) 1
  ------------------
  324|  3.41k|        return tok;
  325|  3.41k|      }
  326|       |      /* fall through */
  327|     20|    default:
  ------------------
  |  Branch (327:5): [True: 6, False: 19.4k]
  ------------------
  328|     20|      *nextTokPtr = ptr;
  329|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  330|  19.4k|    }
  331|  19.4k|  }
  332|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.34k|}
xmltok.c:normal_checkPiTarget:
  232|  6.19k|                      int *tokPtr) {
  233|  6.19k|  int upper = 0;
  234|  6.19k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.19k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  6.19k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  6.19k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  6.19k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  6.19k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 3.97k, False: 2.21k]
  ------------------
  237|  3.97k|    return 1;
  238|  2.21k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.21k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|    856|  case ASCII_x:
  ------------------
  |  |   86|    856|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 856, False: 1.35k]
  ------------------
  240|    856|    break;
  241|    827|  case ASCII_X:
  ------------------
  |  |   59|    827|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 827, False: 1.38k]
  ------------------
  242|    827|    upper = 1;
  243|    827|    break;
  244|    531|  default:
  ------------------
  |  Branch (244:3): [True: 531, False: 1.68k]
  ------------------
  245|    531|    return 1;
  246|  2.21k|  }
  247|  1.68k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.68k|#  define MINBPC(enc) 1
  ------------------
  248|  1.68k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.68k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    692|  case ASCII_m:
  ------------------
  |  |   75|    692|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 692, False: 991]
  ------------------
  250|    692|    break;
  251|    573|  case ASCII_M:
  ------------------
  |  |   48|    573|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 573, False: 1.11k]
  ------------------
  252|    573|    upper = 1;
  253|    573|    break;
  254|    418|  default:
  ------------------
  |  Branch (254:3): [True: 418, False: 1.26k]
  ------------------
  255|    418|    return 1;
  256|  1.68k|  }
  257|  1.26k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.26k|#  define MINBPC(enc) 1
  ------------------
  258|  1.26k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.26k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    258|  case ASCII_l:
  ------------------
  |  |   74|    258|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 258, False: 1.00k]
  ------------------
  260|    258|    break;
  261|      3|  case ASCII_L:
  ------------------
  |  |   47|      3|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 3, False: 1.26k]
  ------------------
  262|      3|    upper = 1;
  263|      3|    break;
  264|  1.00k|  default:
  ------------------
  |  Branch (264:3): [True: 1.00k, False: 261]
  ------------------
  265|  1.00k|    return 1;
  266|  1.26k|  }
  267|    261|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 257]
  ------------------
  268|      4|    return 0;
  269|    257|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    257|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    257|  return 1;
  271|    261|}
xmltok.c:normal_scanPercent:
  924|  4.73k|                    const char **nextTokPtr) {
  925|  4.73k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.73k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.73k|    {                                                                          \
  |  |  |  |  135|  4.73k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.73k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.73k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 34, False: 4.69k]
  |  |  |  |  ------------------
  |  |  |  |  136|     34|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     34|      }                                                                        \
  |  |  |  |  138|  4.73k|    }
  |  |  ------------------
  ------------------
  926|  4.69k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.69k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  1.88k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.53k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 4.69k]
  |  |  ------------------
  |  |  111|  1.53k|    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.53k|    /* fall through */                                                         \
  |  |  116|  1.53k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 596, False: 4.10k]
  |  |  ------------------
  |  |  117|  1.53k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 934, False: 3.76k]
  |  |  ------------------
  |  |  118|  1.53k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.53k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.53k|    break;                                                                     \
  |  |  120|  1.53k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    212|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 233, False: 4.46k]
  |  |  |  |  ------------------
  |  |  |  |  100|    233|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 232]
  |  |  |  |  ------------------
  |  |  |  |  101|    212|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    232|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    464|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    232|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 17, False: 215]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    215|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    215|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 212]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|    232|    ptr += n;                                                                  \
  |  |  |  |  107|    212|    break;
  |  |  ------------------
  |  |  121|    397|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    394|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 397, False: 4.30k]
  |  |  |  |  ------------------
  |  |  |  |  100|    397|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 396]
  |  |  |  |  ------------------
  |  |  |  |  101|    394|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    396|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    792|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    396|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 395]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    395|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    395|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 394]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    396|    ptr += n;                                                                  \
  |  |  |  |  107|    394|    break;
  |  |  ------------------
  |  |  122|    394|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 4.68k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     26|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      2|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|  1.03k|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 1.03k, False: 3.66k]
  ------------------
  929|  1.93k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 902, False: 3.79k]
  ------------------
  930|  2.51k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 582, False: 4.11k]
  ------------------
  931|  2.52k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 4, False: 4.69k]
  ------------------
  932|  2.52k|    *nextTokPtr = ptr;
  933|  2.52k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  2.52k|#define XML_TOK_PERCENT 22
  ------------------
  934|      3|  default:
  ------------------
  |  Branch (934:3): [True: 3, False: 4.69k]
  ------------------
  935|      3|    *nextTokPtr = ptr;
  936|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  937|  4.69k|  }
  938|  5.42k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  5.42k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.42k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.42k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  8.98k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.67k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 5.42k]
  |  |  ------------------
  |  |   82|  2.67k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  2.67k|    /* fall through */                                                         \
  |  |   87|  2.67k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 725, False: 4.69k]
  |  |  ------------------
  |  |   88|  2.06k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.34k, False: 4.08k]
  |  |  ------------------
  |  |   89|  2.27k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 204, False: 5.21k]
  |  |  ------------------
  |  |   90|  2.47k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 203, False: 5.21k]
  |  |  ------------------
  |  |   91|  2.67k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 203, False: 5.21k]
  |  |  ------------------
  |  |   92|  2.67k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.67k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.67k|    break;                                                                     \
  |  |   94|  2.67k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    386|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 400, False: 5.02k]
  |  |  |  |  ------------------
  |  |  |  |   71|    400|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 397]
  |  |  |  |  ------------------
  |  |  |  |   72|    386|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    397|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    794|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    397|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 388]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    388|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    388|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 386]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    397|    ptr += n;                                                                  \
  |  |  |  |   78|    386|    break;
  |  |  ------------------
  |  |   95|    386|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    312|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 323, False: 5.09k]
  |  |  |  |  ------------------
  |  |  |  |   71|    323|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 320]
  |  |  |  |  ------------------
  |  |  |  |   72|    312|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    320|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    640|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    320|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, 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|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|    320|    ptr += n;                                                                  \
  |  |  |  |   78|    312|    break;
  |  |  ------------------
  |  |   96|    312|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 5.41k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 6]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     12|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|      6|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.99k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.99k, False: 3.42k]
  ------------------
  942|  1.99k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.99k|#  define MINBPC(enc) 1
  ------------------
  943|  1.99k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.99k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     17|    default:
  ------------------
  |  Branch (944:5): [True: 17, False: 5.40k]
  ------------------
  945|     17|      *nextTokPtr = ptr;
  946|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  947|  5.42k|    }
  948|  5.42k|  }
  949|     89|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     89|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  2.13k|}
xmltok.c:normal_scanPoundName:
  954|  7.87k|                      const char **nextTokPtr) {
  955|  7.87k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.87k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.87k|    {                                                                          \
  |  |  |  |  135|  7.87k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.87k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.87k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 7.87k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  7.87k|    }
  |  |  ------------------
  ------------------
  956|  7.87k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  7.87k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.87k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  7.33k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  7.81k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 7.87k]
  |  |  ------------------
  |  |  111|  7.81k|    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.81k|    /* fall through */                                                         \
  |  |  116|  7.81k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 7.24k, False: 627]
  |  |  ------------------
  |  |  117|  7.81k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 576, False: 7.29k]
  |  |  ------------------
  |  |  118|  7.81k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  7.81k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  7.81k|    break;                                                                     \
  |  |  120|  7.81k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      6|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 7.84k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      9|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      6|    break;
  |  |  ------------------
  |  |  121|     12|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      6|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 7.85k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     20|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      8|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      6|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 7.85k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, 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|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      1|  default:
  ------------------
  |  Branch (958:3): [True: 1, False: 7.86k]
  ------------------
  959|      1|    *nextTokPtr = ptr;
  960|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  961|  7.87k|  }
  962|  53.3k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  53.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  53.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  53.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   159k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  45.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 53.3k]
  |  |  ------------------
  |  |   82|  45.1k|    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|  45.1k|    /* fall through */                                                         \
  |  |   87|  45.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 24.8k, False: 28.4k]
  |  |  ------------------
  |  |   88|  44.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 19.5k, False: 33.7k]
  |  |  ------------------
  |  |   89|  44.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 225, False: 53.0k]
  |  |  ------------------
  |  |   90|  44.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 200, False: 53.1k]
  |  |  ------------------
  |  |   91|  45.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 227, False: 53.0k]
  |  |  ------------------
  |  |   92|  45.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  45.1k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  45.1k|    break;                                                                     \
  |  |   94|  45.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    222|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 241, False: 53.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|    241|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 240]
  |  |  |  |  ------------------
  |  |  |  |   72|    222|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    240|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    480|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    240|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 229]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    229|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    229|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 7, False: 222]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|    240|    ptr += n;                                                                  \
  |  |  |  |   78|    222|    break;
  |  |  ------------------
  |  |   95|    243|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    213|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 243, False: 53.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|    243|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 239]
  |  |  |  |  ------------------
  |  |  |  |   72|    213|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    239|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    478|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    239|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 17, False: 222]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    222|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    222|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 9, False: 213]
  |  |  |  |  ------------------
  |  |  |  |   74|     26|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     26|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     26|    }                                                                          \
  |  |  |  |   77|    239|    ptr += n;                                                                  \
  |  |  |  |   78|    213|    break;
  |  |  ------------------
  |  |   96|    213|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 28, False: 53.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|     28|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 24]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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: 23, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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;
  |  |  ------------------
  ------------------
  965|    876|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 876, False: 52.4k]
  ------------------
  966|  6.01k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 5.13k, False: 48.1k]
  ------------------
  967|  6.45k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 447, False: 52.8k]
  ------------------
  968|  6.93k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 473, False: 52.8k]
  ------------------
  969|  7.25k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 323, False: 52.9k]
  ------------------
  970|  7.25k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 53.3k]
  ------------------
  971|  7.67k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 417, False: 52.8k]
  ------------------
  972|  7.67k|      *nextTokPtr = ptr;
  973|  7.67k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  7.67k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     11|    default:
  ------------------
  |  Branch (974:5): [True: 11, False: 53.3k]
  ------------------
  975|     11|      *nextTokPtr = ptr;
  976|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  977|  53.3k|    }
  978|  53.3k|  }
  979|     71|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     71|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  7.83k|}
xmltok.c:normal_contentTok:
  824|   110M|                   const char **nextTokPtr) {
  825|   110M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 263k, False: 110M]
  ------------------
  826|   263k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   263k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|   110M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|   110M|#  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|   110M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   110M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   110M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  3.20M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 3.20M, False: 107M]
  ------------------
  838|  3.20M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.20M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.20M|#  define MINBPC(enc) 1
  ------------------
  839|   311k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 311k, False: 109M]
  ------------------
  840|   311k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   311k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   311k|#  define MINBPC(enc) 1
  ------------------
  841|  4.22k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 4.22k, False: 110M]
  ------------------
  842|  4.22k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.22k|#  define MINBPC(enc) 1
  ------------------
  843|  4.22k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.22k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.22k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  4.22k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 17, False: 4.20k]
  ------------------
  844|     17|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     17|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  4.20k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  4.20k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.20k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 3.08k, False: 1.12k]
  ------------------
  846|  3.08k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.08k|#  define MINBPC(enc) 1
  ------------------
  847|  4.20k|    *nextTokPtr = ptr;
  848|  4.20k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.20k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  95.3M|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 95.3M, False: 14.8M]
  ------------------
  850|  95.3M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  95.3M|#  define MINBPC(enc) 1
  ------------------
  851|  95.3M|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  95.3M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  6.25k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 6.25k, False: 110M]
  ------------------
  853|  6.25k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.25k|#  define MINBPC(enc) 1
  ------------------
  854|  6.25k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.25k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.25k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  6.25k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 1.04k, False: 5.21k]
  ------------------
  855|  1.04k|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|  1.04k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  5.21k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  5.21k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 2.70k, False: 2.50k]
  ------------------
  857|  2.70k|      break;
  858|  2.50k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.50k|#  define MINBPC(enc) 1
  ------------------
  859|  2.50k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.50k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  2.50k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 223, False: 2.28k]
  ------------------
  860|    223|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    223|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  2.28k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  2.28k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 2.28k, False: 1]
  ------------------
  862|  2.28k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  2.28k|#  define MINBPC(enc) 1
  ------------------
  863|  2.28k|      break;
  864|  2.28k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  4.18M|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.06M|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.06M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.06M, False: 108M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.06M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 10, False: 2.06M]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.06M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     10|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.06M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.06M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.06M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 2.06M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     12|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     12|    }                                                                          \
  |  |  |  |   56|  2.06M|    ptr += n;                                                                  \
  |  |  |  |   57|  2.06M|    break;
  |  |  ------------------
  |  |   61|  2.06M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.82k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.84k, False: 110M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.84k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 7, False: 7.84k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.82k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      7|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.84k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.84k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.84k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 7.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     16|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     16|    }                                                                          \
  |  |  |  |   56|  7.84k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.82k|    break;
  |  |  ------------------
  |  |   62|  17.8k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  17.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 17.8k, False: 110M]
  |  |  |  |  ------------------
  |  |  |  |   50|  17.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 17.8k]
  |  |  |  |  ------------------
  |  |  |  |   51|  17.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  17.8k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  17.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  17.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 21, False: 17.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     21|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     21|    }                                                                          \
  |  |  |  |   56|  17.8k|    ptr += n;                                                                  \
  |  |  |  |   57|  17.8k|    break;
  |  |  ------------------
  |  |   63|  17.8k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 32, False: 110M]
  |  |  ------------------
  |  |   64|     48|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 16, False: 110M]
  |  |  ------------------
  |  |   65|     62|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 14, False: 110M]
  |  |  ------------------
  |  |   66|     62|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     62|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     62|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  9.24M|  default:
  ------------------
  |  Branch (868:3): [True: 9.24M, False: 100M]
  ------------------
  869|  9.24M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  9.24M|#  define MINBPC(enc) 1
  ------------------
  870|  9.24M|    break;
  871|   110M|  }
  872|   288M|  while (HAS_CHAR(enc, ptr, end)) {
  873|   288M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   288M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   288M|  (((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|  96.6k|      LEAD_CASE(2)
  ------------------
  |  |  875|  96.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 96.6k, False: 288M]
  |  |  ------------------
  |  |  876|  96.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  96.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  96.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 9, False: 96.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 7, False: 96.6k]
  |  |  ------------------
  |  |  877|     16|      *nextTokPtr = ptr;                                                       \
  |  |  878|     16|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     16|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     16|    }                                                                          \
  |  |  880|  96.6k|    ptr += n;                                                                  \
  |  |  881|  96.6k|    break;
  ------------------
  883|  8.49M|      LEAD_CASE(3)
  ------------------
  |  |  875|  8.49M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 8.49M, False: 280M]
  |  |  ------------------
  |  |  876|  8.49M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  8.49M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  8.49M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 13, False: 8.49M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 8.49M]
  |  |  ------------------
  |  |  877|     15|      *nextTokPtr = ptr;                                                       \
  |  |  878|     15|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     15|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     15|    }                                                                          \
  |  |  880|  8.49M|    ptr += n;                                                                  \
  |  |  881|  8.49M|    break;
  ------------------
  884|  17.5k|      LEAD_CASE(4)
  ------------------
  |  |  875|  17.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 17.5k, False: 288M]
  |  |  ------------------
  |  |  876|  17.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  17.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  17.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 18, False: 17.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 4, False: 17.5k]
  |  |  ------------------
  |  |  877|     22|      *nextTokPtr = ptr;                                                       \
  |  |  878|     22|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     22|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     22|    }                                                                          \
  |  |  880|  17.5k|    ptr += n;                                                                  \
  |  |  881|  17.5k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|   249k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 249k, False: 288M]
  ------------------
  887|   249k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|   249k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|   249k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 248k, False: 955]
  |  |  ------------------
  ------------------
  888|   248k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|   248k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 246k, False: 2.10k]
  ------------------
  889|   246k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   246k|#  define MINBPC(enc) 1
  ------------------
  890|   246k|          break;
  891|   246k|        }
  892|  2.10k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  2.10k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  2.10k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 1.89k, False: 205]
  |  |  ------------------
  ------------------
  893|  1.89k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  1.89k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 1.89k, False: 3]
  ------------------
  894|  1.89k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.89k|#  define MINBPC(enc) 1
  ------------------
  895|  1.89k|            break;
  896|  1.89k|          }
  897|      3|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      3|#  define MINBPC(enc) 1
  ------------------
  898|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  899|  1.89k|        }
  900|  2.10k|      }
  901|       |      /* fall through */
  902|  74.2k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 73.0k, False: 288M]
  ------------------
  903|   321k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 246k, False: 288M]
  ------------------
  904|   321k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 23, False: 288M]
  ------------------
  905|   321k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 13, False: 288M]
  ------------------
  906|   321k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 8, False: 288M]
  ------------------
  907|   321k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 610, False: 288M]
  ------------------
  908|  11.0M|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 10.7M, False: 277M]
  ------------------
  909|  11.0M|      *nextTokPtr = ptr;
  910|  11.0M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  11.0M|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   268M|    default:
  ------------------
  |  Branch (911:5): [True: 268M, False: 19.9M]
  ------------------
  912|   268M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   268M|#  define MINBPC(enc) 1
  ------------------
  913|   268M|      break;
  914|   288M|    }
  915|   288M|  }
  916|   247k|  *nextTokPtr = ptr;
  917|   247k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   247k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  11.3M|}
xmltok.c:normal_scanLt:
  726|  3.20M|               const char **nextTokPtr) {
  727|  3.20M|#  ifdef XML_NS
  728|  3.20M|  int hadColon;
  729|  3.20M|#  endif
  730|  3.20M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.20M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.20M|    {                                                                          \
  |  |  |  |  135|  3.20M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.20M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.20M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 3.20M]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|  3.20M|    }
  |  |  ------------------
  ------------------
  731|  3.20M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.20M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.20M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|   238k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.18M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.20M]
  |  |  ------------------
  |  |  111|  3.18M|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  3.18M|    /* fall through */                                                         \
  |  |  116|  3.18M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 229k, False: 2.97M]
  |  |  ------------------
  |  |  117|  3.18M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.95M, False: 245k]
  |  |  ------------------
  |  |  118|  3.18M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.18M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  3.18M|    break;                                                                     \
  |  |  120|  3.18M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    860|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 864, False: 3.20M]
  |  |  |  |  ------------------
  |  |  |  |  100|    864|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 863]
  |  |  |  |  ------------------
  |  |  |  |  101|    860|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    863|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.72k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    863|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 861]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    861|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    861|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 860]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    863|    ptr += n;                                                                  \
  |  |  |  |  107|    860|    break;
  |  |  ------------------
  |  |  121|  3.54k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  3.50k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3.54k, False: 3.20M]
  |  |  |  |  ------------------
  |  |  |  |  100|  3.54k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3.54k]
  |  |  |  |  ------------------
  |  |  |  |  101|  3.50k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  3.54k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.08k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.54k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  3.54k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.54k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 31, False: 3.50k]
  |  |  |  |  ------------------
  |  |  |  |  103|     34|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     34|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     34|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     34|    }                                                                          \
  |  |  |  |  106|  3.54k|    ptr += n;                                                                  \
  |  |  |  |  107|  3.50k|    break;
  |  |  ------------------
  |  |  122|  3.50k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10, False: 3.20M]
  |  |  |  |  ------------------
  |  |  |  |  100|     10|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     16|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 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: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|      8|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.92k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.92k, False: 3.20M]
  ------------------
  734|  1.92k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.92k|#  define MINBPC(enc) 1
  ------------------
  735|  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|    }
  |  |  ------------------
  ------------------
  736|  1.92k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.92k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.92k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 34, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    504|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 504, False: 1.42k]
  ------------------
  738|    504|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    504|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    504|#  define MINBPC(enc) 1
  ------------------
  739|  1.39k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 1.39k, False: 538]
  ------------------
  740|  1.39k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.39k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.39k|#  define MINBPC(enc) 1
  ------------------
  741|  1.92k|    }
  742|     34|    *nextTokPtr = ptr;
  743|     34|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  744|  3.37k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.37k, False: 3.20M]
  ------------------
  745|  3.37k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.37k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.37k|#  define MINBPC(enc) 1
  ------------------
  746|  6.44k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 6.44k, False: 3.19M]
  ------------------
  747|  6.44k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  6.44k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  6.44k|#  define MINBPC(enc) 1
  ------------------
  748|     26|  default:
  ------------------
  |  Branch (748:3): [True: 26, False: 3.20M]
  ------------------
  749|     26|    *nextTokPtr = ptr;
  750|     26|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  751|  3.20M|  }
  752|  3.19M|#  ifdef XML_NS
  753|  3.19M|  hadColon = 0;
  754|  3.19M|#  endif
  755|       |  /* we have a start-tag */
  756|  4.31M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  4.31M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.31M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.31M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|  3.85M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.08M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.31M]
  |  |  ------------------
  |  |   82|  1.08M|    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.08M|    /* fall through */                                                         \
  |  |   87|  1.08M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 620k, False: 3.69M]
  |  |  ------------------
  |  |   88|  1.02M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 409k, False: 3.90M]
  |  |  ------------------
  |  |   89|  1.06M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 34.7k, False: 4.27M]
  |  |  ------------------
  |  |   90|  1.06M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 5.45k, False: 4.30M]
  |  |  ------------------
  |  |   91|  1.08M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 14.6k, False: 4.29M]
  |  |  ------------------
  |  |   92|  1.08M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.08M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.08M|    break;                                                                     \
  |  |   94|  1.08M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.87k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.88k, False: 4.31M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.88k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.88k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.87k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.88k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.76k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.88k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1.87k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.87k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.87k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|  1.88k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.87k|    break;
  |  |  ------------------
  |  |   95|  34.5k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  34.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 34.5k, False: 4.27M]
  |  |  |  |  ------------------
  |  |  |  |   71|  34.5k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 34.5k]
  |  |  |  |  ------------------
  |  |  |  |   72|  34.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  34.5k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  69.0k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  34.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 34.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  34.5k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  34.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 34, False: 34.4k]
  |  |  |  |  ------------------
  |  |  |  |   74|     38|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     38|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     38|    }                                                                          \
  |  |  |  |   77|  34.5k|    ptr += n;                                                                  \
  |  |  |  |   78|  34.4k|    break;
  |  |  ------------------
  |  |   96|  34.4k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 4.31M]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      6|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 4.31M]
  ------------------
  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|  11.9k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 11.9k, False: 4.30M]
  ------------------
  777|  12.3k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 407, False: 4.31M]
  ------------------
  778|  39.1k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 26.7k, False: 4.28M]
  ------------------
  779|  39.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  39.1k|#  define MINBPC(enc) 1
  ------------------
  780|   222k|      while (HAS_CHAR(enc, ptr, end)) {
  781|   222k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   222k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   222k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  12.6k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  12.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 222k]
  |  |  ------------------
  |  |  111|  12.2k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  12.2k|    /* fall through */                                                         \
  |  |  116|  12.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 9.88k, False: 212k]
  |  |  ------------------
  |  |  117|  12.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.31k, False: 219k]
  |  |  ------------------
  |  |  118|  12.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  12.2k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  12.2k|    break;                                                                     \
  |  |  120|  12.2k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    930|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 939, False: 221k]
  |  |  |  |  ------------------
  |  |  |  |  100|    939|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 938]
  |  |  |  |  ------------------
  |  |  |  |  101|    930|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    938|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.87k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    938|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 934]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    934|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    934|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 930]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|    938|    ptr += n;                                                                  \
  |  |  |  |  107|    930|    break;
  |  |  ------------------
  |  |  121|    930|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    432|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 441, False: 221k]
  |  |  |  |  ------------------
  |  |  |  |  100|    441|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 439]
  |  |  |  |  ------------------
  |  |  |  |  101|    432|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    439|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    878|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    439|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 435]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    435|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    435|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 432]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    439|    ptr += n;                                                                  \
  |  |  |  |  107|    432|    break;
  |  |  ------------------
  |  |  122|    432|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 222k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     20|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, 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|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  24.6k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 24.6k, False: 197k]
  ------------------
  784|  24.6k|          goto gt;
  785|    862|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 862, False: 221k]
  ------------------
  786|    862|          goto sol;
  787|  18.7k|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 18.7k, False: 203k]
  ------------------
  788|  19.2k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 437, False: 221k]
  ------------------
  789|   183k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 163k, False: 58.3k]
  ------------------
  790|   183k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   183k|#  define MINBPC(enc) 1
  ------------------
  791|   183k|          continue;
  792|      3|        default:
  ------------------
  |  Branch (792:9): [True: 3, False: 222k]
  ------------------
  793|      3|          *nextTokPtr = ptr;
  794|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  795|   222k|        }
  796|  13.5k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  13.5k|#define PREFIX(ident) normal_##ident
  ------------------
  797|   222k|      }
  798|     39|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  39.1k|    }
  800|  3.14M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 3.14M, False: 1.16M]
  ------------------
  801|  3.17M|    gt:
  802|  3.17M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.17M|#  define MINBPC(enc) 1
  ------------------
  803|  3.17M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  3.17M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  6.93k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 6.93k, False: 4.30M]
  ------------------
  805|  7.79k|    sol:
  806|  7.79k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.79k|#  define MINBPC(enc) 1
  ------------------
  807|  7.79k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.79k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.79k|    {                                                                          \
  |  |  |  |  135|  7.79k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.79k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.79k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 7.78k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  7.79k|    }
  |  |  ------------------
  ------------------
  808|  7.78k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  7.78k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 10, False: 7.77k]
  ------------------
  809|     10|        *nextTokPtr = ptr;
  810|     10|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  811|     10|      }
  812|  7.77k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  7.77k|#  define MINBPC(enc) 1
  ------------------
  813|  7.77k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  7.77k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     26|    default:
  ------------------
  |  Branch (814:5): [True: 26, False: 4.31M]
  ------------------
  815|     26|      *nextTokPtr = ptr;
  816|     26|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  817|  4.31M|    }
  818|  4.31M|  }
  819|     83|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     83|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  3.19M|}
xmltok.c:normal_scanCdataSection:
  337|  1.39k|                         const char **nextTokPtr) {
  338|  1.39k|  static const char CDATA_LSQB[]
  339|  1.39k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  1.39k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  1.39k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.39k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  1.39k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.39k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  1.39k|#define ASCII_LSQB 0x5B
  ------------------
  340|  1.39k|  int i;
  341|  1.39k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.39k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  1.39k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  1.39k|    {                                                                          \
  |  |  135|  1.39k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  1.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.39k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 1.38k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  1.39k|    }
  ------------------
  344|  9.67k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  8.28k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 8.29k, False: 1.37k]
  ------------------
  345|  8.29k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|  8.29k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 9, False: 8.28k]
  ------------------
  346|      9|      *nextTokPtr = ptr;
  347|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  348|      9|    }
  349|  8.29k|  }
  350|  1.37k|  *nextTokPtr = ptr;
  351|  1.37k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  1.37k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  1.38k|}
xmltok.c:normal_scanEndTag:
  432|  6.44k|                   const char **nextTokPtr) {
  433|  6.44k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.44k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.44k|    {                                                                          \
  |  |  |  |  135|  6.44k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.44k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.44k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 6.43k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  6.44k|    }
  |  |  ------------------
  ------------------
  434|  6.43k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.43k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.43k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  3.22k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.74k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 6.43k]
  |  |  ------------------
  |  |  111|  5.74k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  5.74k|    /* fall through */                                                         \
  |  |  116|  5.74k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.84k, False: 4.59k]
  |  |  ------------------
  |  |  117|  5.74k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.89k, False: 2.54k]
  |  |  ------------------
  |  |  118|  5.74k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.74k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  5.74k|    break;                                                                     \
  |  |  120|  5.74k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    389|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 398, False: 6.04k]
  |  |  |  |  ------------------
  |  |  |  |  100|    398|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 397]
  |  |  |  |  ------------------
  |  |  |  |  101|    389|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    397|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    794|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    397|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 391]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    391|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    391|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 389]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|    397|    ptr += n;                                                                  \
  |  |  |  |  107|    389|    break;
  |  |  ------------------
  |  |  121|    389|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    288|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 292, False: 6.14k]
  |  |  |  |  ------------------
  |  |  |  |  100|    292|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 291]
  |  |  |  |  ------------------
  |  |  |  |  101|    288|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    291|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    582|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    291|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 289]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    289|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    289|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 288]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    291|    ptr += n;                                                                  \
  |  |  |  |  107|    288|    break;
  |  |  ------------------
  |  |  122|    288|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 4, False: 6.43k]
  |  |  |  |  ------------------
  |  |  |  |  100|      4|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, 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|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      2|  default:
  ------------------
  |  Branch (436:3): [True: 2, False: 6.43k]
  ------------------
  437|      2|    *nextTokPtr = ptr;
  438|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  439|  6.43k|  }
  440|   770k|  while (HAS_CHAR(enc, ptr, end)) {
  441|   770k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   770k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   770k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  1.53M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.87k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 770k]
  |  |  ------------------
  |  |   82|  2.87k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  2.87k|    /* fall through */                                                         \
  |  |   87|  2.87k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.75k, False: 768k]
  |  |  ------------------
  |  |   88|  2.07k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 322, False: 769k]
  |  |  ------------------
  |  |   89|  2.34k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 268, False: 769k]
  |  |  ------------------
  |  |   90|  2.56k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 227, False: 769k]
  |  |  ------------------
  |  |   91|  2.87k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 305, False: 769k]
  |  |  ------------------
  |  |   92|  2.87k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.87k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.87k|    break;                                                                     \
  |  |   94|  2.87k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    992|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.00k, False: 769k]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.00k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.00k]
  |  |  |  |  ------------------
  |  |  |  |   72|    992|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.00k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.00k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.00k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 998]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    998|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    998|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 992]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|  1.00k|    ptr += n;                                                                  \
  |  |  |  |   78|    992|    break;
  |  |  ------------------
  |  |   95|   759k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   759k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 759k, False: 10.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|   759k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 759k]
  |  |  |  |  ------------------
  |  |  |  |   72|   759k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   759k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.51M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   759k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 759k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   759k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   759k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 29, False: 759k]
  |  |  |  |  ------------------
  |  |  |  |   74|     31|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     31|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     31|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     31|    }                                                                          \
  |  |  |  |   77|   759k|    ptr += n;                                                                  \
  |  |  |  |   78|   759k|    break;
  |  |  ------------------
  |  |   96|   759k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 15, False: 770k]
  |  |  |  |  ------------------
  |  |  |  |   71|     15|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, 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|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    452|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 452, False: 769k]
  ------------------
  444|  1.04k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 595, False: 769k]
  ------------------
  445|  1.27k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 226, False: 769k]
  ------------------
  446|  2.14k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.27k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|    911|#  define MINBPC(enc) 1
  ------------------
  447|  2.14k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.14k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.14k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    219|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 219, False: 1.92k]
  ------------------
  449|    669|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 450, False: 1.69k]
  ------------------
  450|    911|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 242, False: 1.90k]
  ------------------
  451|    911|          break;
  452|  1.22k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.22k, False: 921]
  ------------------
  453|  1.22k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.22k|#  define MINBPC(enc) 1
  ------------------
  454|  1.22k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.22k|#define XML_TOK_END_TAG 5
  ------------------
  455|     10|        default:
  ------------------
  |  Branch (455:9): [True: 10, False: 2.13k]
  ------------------
  456|     10|          *nextTokPtr = ptr;
  457|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  458|  2.14k|        }
  459|  2.14k|      }
  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: 770k]
  ------------------
  463|       |      /* no need to check qname syntax here,
  464|       |         since end-tag must match exactly */
  465|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  466|      0|      break;
  467|      0|#  endif
  468|  5.00k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 5.00k, False: 765k]
  ------------------
  469|  5.00k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.00k|#  define MINBPC(enc) 1
  ------------------
  470|  5.00k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  5.00k|#define XML_TOK_END_TAG 5
  ------------------
  471|      6|    default:
  ------------------
  |  Branch (471:5): [True: 6, False: 770k]
  ------------------
  472|      6|      *nextTokPtr = ptr;
  473|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  474|   770k|    }
  475|   770k|  }
  476|     80|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     80|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  6.42k|}
xmltok.c:normal_scanAtts:
  573|  13.5k|                 const char **nextTokPtr) {
  574|  13.5k|#  ifdef XML_NS
  575|  13.5k|  int hadColon = 0;
  576|  13.5k|#  endif
  577|  3.57M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  3.57M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.57M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.57M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  1.74M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.01M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.57M]
  |  |  ------------------
  |  |   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: 404k, False: 3.16M]
  |  |  ------------------
  |  |   88|   409k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.27k, False: 3.56M]
  |  |  ------------------
  |  |   89|   462k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 53.7k, False: 3.51M]
  |  |  ------------------
  |  |   90|   465k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 2.06k, False: 3.57M]
  |  |  ------------------
  |  |   91|  1.01M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 548k, False: 3.02M]
  |  |  ------------------
  |  |   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|    926|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 934, False: 3.57M]
  |  |  |  |  ------------------
  |  |  |  |   71|    934|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 933]
  |  |  |  |  ------------------
  |  |  |  |   72|    926|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    933|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.86k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    933|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 932]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    932|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    932|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 926]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    933|    ptr += n;                                                                  \
  |  |  |  |   78|    926|    break;
  |  |  ------------------
  |  |   95|  1.20k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.15k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.20k, False: 3.57M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.20k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.20k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.15k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.20k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.40k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.20k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.20k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.20k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 47, False: 1.15k]
  |  |  |  |  ------------------
  |  |  |  |   74|     49|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     49|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     49|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     49|    }                                                                          \
  |  |  |  |   77|  1.20k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.15k|    break;
  |  |  ------------------
  |  |   96|  1.15k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 17, False: 3.57M]
  |  |  |  |  ------------------
  |  |  |  |   71|     17|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     32|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     16|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     10|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 3.57M]
  ------------------
  582|      0|      if (hadColon) {
  ------------------
  |  Branch (582:11): [True: 0, False: 0]
  ------------------
  583|      0|        *nextTokPtr = ptr;
  584|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  585|      0|      }
  586|      0|      hadColon = 1;
  587|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  588|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  589|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|      0|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  590|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  591|      0|      default:
  ------------------
  |  Branch (591:7): [True: 0, False: 0]
  ------------------
  592|      0|        *nextTokPtr = ptr;
  593|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  594|      0|      }
  595|      0|      break;
  596|      0|#  endif
  597|  2.26k|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 2.26k, False: 3.57M]
  ------------------
  598|  3.44k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 1.17k, False: 3.57M]
  ------------------
  599|  3.88k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 445, False: 3.57M]
  ------------------
  600|  4.51k|      for (;;) {
  601|  4.51k|        int t;
  602|       |
  603|  4.51k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.51k|#  define MINBPC(enc) 1
  ------------------
  604|  4.51k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.51k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.51k|    {                                                                          \
  |  |  |  |  135|  4.51k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.51k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.51k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 4.47k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  4.51k|    }
  |  |  ------------------
  ------------------
  605|  4.47k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  4.47k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.47k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  4.47k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 3.84k, False: 626]
  ------------------
  607|  3.84k|          break;
  608|    626|        switch (t) {
  609|    198|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 198, False: 428]
  ------------------
  610|    427|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 229, False: 397]
  ------------------
  611|    623|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 196, False: 430]
  ------------------
  612|    623|          break;
  613|      3|        default:
  ------------------
  |  Branch (613:9): [True: 3, False: 623]
  ------------------
  614|      3|          *nextTokPtr = ptr;
  615|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  616|    626|        }
  617|    626|      }
  618|       |      /* fall through */
  619|  2.55M|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 2.55M, False: 1.01M]
  ------------------
  620|  2.55M|      int open;
  621|  2.55M|#  ifdef XML_NS
  622|  2.55M|      hadColon = 0;
  623|  2.55M|#  endif
  624|  2.55M|      for (;;) {
  625|  2.55M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.55M|#  define MINBPC(enc) 1
  ------------------
  626|  2.55M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.55M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.55M|    {                                                                          \
  |  |  |  |  135|  2.55M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.55M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.55M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 2.55M]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  2.55M|    }
  |  |  ------------------
  ------------------
  627|  2.55M|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  2.55M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.55M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|  2.55M|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 76.3k, False: 2.48M]
  |  Branch (628:32): [True: 2.48M, False: 728]
  ------------------
  629|  2.55M|          break;
  630|    728|        switch (open) {
  631|    314|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 314, False: 414]
  ------------------
  632|    521|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 207, False: 521]
  ------------------
  633|    718|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 197, False: 531]
  ------------------
  634|    718|          break;
  635|     10|        default:
  ------------------
  |  Branch (635:9): [True: 10, False: 718]
  ------------------
  636|     10|          *nextTokPtr = ptr;
  637|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  638|    728|        }
  639|    728|      }
  640|  2.55M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.55M|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  11.9M|      for (;;) {
  643|  11.9M|        int t;
  644|  11.9M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.9M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.9M|    {                                                                          \
  |  |  |  |  135|  11.9M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.9M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  11.9M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 80, False: 11.9M]
  |  |  |  |  ------------------
  |  |  |  |  136|     80|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     80|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     80|      }                                                                        \
  |  |  |  |  138|  11.9M|    }
  |  |  ------------------
  ------------------
  645|  11.9M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  11.9M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.9M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  11.9M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 2.55M, False: 9.38M]
  ------------------
  647|  2.55M|          break;
  648|  9.38M|        switch (t) {
  649|  10.4M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  82.8k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  82.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 82.8k, False: 9.30M]
  |  |  |  |  ------------------
  |  |  |  |   50|  82.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 82.8k]
  |  |  |  |  ------------------
  |  |  |  |   51|  82.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  82.8k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  82.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  82.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 82.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  82.8k|    ptr += n;                                                                  \
  |  |  |  |   57|  82.8k|    break;
  |  |  ------------------
  |  |   61|  5.14M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.14M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.14M, False: 4.23M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.14M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 5.14M]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.14M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.14M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.14M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.14M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 5.14M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  5.14M|    ptr += n;                                                                  \
  |  |  |  |   57|  5.14M|    break;
  |  |  ------------------
  |  |   62|  5.14M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.31k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.32k, False: 9.38M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.32k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.31k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.32k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.32k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.32k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  1.32k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.31k|    break;
  |  |  ------------------
  |  |   63|  1.31k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 2, False: 9.38M]
  |  |  ------------------
  |  |   64|      5|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 3, False: 9.38M]
  |  |  ------------------
  |  |   65|      6|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 1, False: 9.38M]
  |  |  ------------------
  |  |   66|      6|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      6|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  48.4k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 48.4k, False: 9.33M]
  ------------------
  651|  48.4k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  48.4k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  48.4k|#  define MINBPC(enc) 1
  ------------------
  652|  48.4k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 18, False: 48.4k]
  ------------------
  653|     18|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 15, False: 3]
  ------------------
  654|     15|              *nextTokPtr = ptr;
  655|     18|            return tok;
  656|     18|          }
  657|  48.4k|          break;
  658|  48.4k|        }
  659|  48.4k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 42, False: 9.38M]
  ------------------
  660|     42|          *nextTokPtr = ptr;
  661|     42|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
  662|  4.10M|        default:
  ------------------
  |  Branch (662:9): [True: 4.10M, False: 5.28M]
  ------------------
  663|  4.10M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.10M|#  define MINBPC(enc) 1
  ------------------
  664|  4.10M|          break;
  665|  9.38M|        }
  666|  9.38M|      }
  667|  2.55M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.55M|#  define MINBPC(enc) 1
  ------------------
  668|  2.55M|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.55M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.55M|    {                                                                          \
  |  |  |  |  135|  2.55M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.55M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.55M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 2.55M]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  2.55M|    }
  |  |  ------------------
  ------------------
  669|  2.55M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.55M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.55M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|  1.33M|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 1.33M, False: 1.21M]
  ------------------
  671|  2.54M|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 1.20M, False: 1.34M]
  ------------------
  672|  2.54M|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.61k, False: 2.55M]
  ------------------
  673|  2.54M|        break;
  674|  4.68k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 4.68k, False: 2.55M]
  ------------------
  675|  4.68k|        goto sol;
  676|  3.64k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 3.64k, False: 2.55M]
  ------------------
  677|  3.64k|        goto gt;
  678|     25|      default:
  ------------------
  |  Branch (678:7): [True: 25, False: 2.55M]
  ------------------
  679|     25|        *nextTokPtr = ptr;
  680|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  681|  2.55M|      }
  682|       |      /* ptr points to closing quote */
  683|  3.13M|      for (;;) {
  684|  3.13M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.13M|#  define MINBPC(enc) 1
  ------------------
  685|  3.13M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.13M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.13M|    {                                                                          \
  |  |  |  |  135|  3.13M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.13M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.13M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 3.13M]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|  3.13M|    }
  |  |  ------------------
  ------------------
  686|  3.13M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.13M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.13M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|  2.53M|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.54M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.13M]
  |  |  ------------------
  |  |  111|  2.54M|    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.54M|    /* fall through */                                                         \
  |  |  116|  2.54M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.53M, False: 596k]
  |  |  ------------------
  |  |  117|  2.54M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 7.86k, False: 3.12M]
  |  |  ------------------
  |  |  118|  2.54M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.54M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.54M|    break;                                                                     \
  |  |  120|  2.54M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.14k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.15k, False: 3.12M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.15k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.15k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.14k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.15k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.30k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.15k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.14k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.14k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 1.14k]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|  1.15k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.14k|    break;
  |  |  ------------------
  |  |  121|  1.14k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    725|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 728, False: 3.13M]
  |  |  |  |  ------------------
  |  |  |  |  100|    728|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 727]
  |  |  |  |  ------------------
  |  |  |  |  101|    725|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    727|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.45k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    727|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 726]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    726|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    726|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 725]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    727|    ptr += n;                                                                  \
  |  |  |  |  107|    725|    break;
  |  |  ------------------
  |  |  122|    725|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 3.13M]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|   572k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 572k, False: 2.55M]
  ------------------
  689|   582k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 9.28k, False: 3.12M]
  ------------------
  690|   582k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 256, False: 3.13M]
  ------------------
  691|   582k|          continue;
  692|    420|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 420, False: 3.13M]
  ------------------
  693|  4.06k|        gt:
  694|  4.06k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.06k|#  define MINBPC(enc) 1
  ------------------
  695|  4.06k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  4.06k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|  4.26k|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 4.26k, False: 3.12M]
  ------------------
  697|  8.94k|        sol:
  698|  8.94k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  8.94k|#  define MINBPC(enc) 1
  ------------------
  699|  8.94k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.94k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.94k|    {                                                                          \
  |  |  |  |  135|  8.94k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.94k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  8.94k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 8.94k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  8.94k|    }
  |  |  ------------------
  ------------------
  700|  8.94k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  8.94k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 8, False: 8.93k]
  ------------------
  701|      8|            *nextTokPtr = ptr;
  702|      8|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  703|      8|          }
  704|  8.93k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  8.93k|#  define MINBPC(enc) 1
  ------------------
  705|  8.93k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  8.93k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      3|        default:
  ------------------
  |  Branch (706:9): [True: 3, False: 3.13M]
  ------------------
  707|      3|          *nextTokPtr = ptr;
  708|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  709|  3.13M|        }
  710|  2.54M|        break;
  711|  3.13M|      }
  712|  2.54M|      break;
  713|  2.54M|    }
  714|  2.54M|    default:
  ------------------
  |  Branch (714:5): [True: 33, False: 3.57M]
  ------------------
  715|     33|      *nextTokPtr = ptr;
  716|     33|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  717|  3.57M|    }
  718|  3.57M|  }
  719|     92|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     92|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  13.5k|}
xmltok.c:normal_scanRef:
  545|   612k|                const char **nextTokPtr) {
  546|   612k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   612k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   612k|    {                                                                          \
  |  |  |  |  135|   612k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   612k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   612k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 33, False: 612k]
  |  |  |  |  ------------------
  |  |  |  |  136|     33|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     33|      }                                                                        \
  |  |  |  |  138|   612k|    }
  |  |  ------------------
  ------------------
  547|   612k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   612k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   612k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|   581k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   589k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 612k]
  |  |  ------------------
  |  |  111|   589k|    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|   589k|    /* fall through */                                                         \
  |  |  116|   589k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 580k, False: 31.7k]
  |  |  ------------------
  |  |  117|   589k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 8.87k, False: 603k]
  |  |  ------------------
  |  |  118|   589k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   589k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   589k|    break;                                                                     \
  |  |  120|   589k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    303|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 310, False: 611k]
  |  |  |  |  ------------------
  |  |  |  |  100|    310|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 308]
  |  |  |  |  ------------------
  |  |  |  |  101|    303|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    308|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    616|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    308|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 305]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    305|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    305|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 303]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    308|    ptr += n;                                                                  \
  |  |  |  |  107|    303|    break;
  |  |  ------------------
  |  |  121|    364|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    359|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 364, False: 611k]
  |  |  |  |  ------------------
  |  |  |  |  100|    364|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 362]
  |  |  |  |  ------------------
  |  |  |  |  101|    359|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    362|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    724|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    362|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 360]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    360|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    360|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 359]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    362|    ptr += n;                                                                  \
  |  |  |  |  107|    359|    break;
  |  |  ------------------
  |  |  122|    359|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 612k]
  |  |  |  |  ------------------
  |  |  |  |  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: 11, 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|     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|  22.1k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 22.1k, False: 589k]
  ------------------
  550|  22.1k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  22.1k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  22.1k|#  define MINBPC(enc) 1
  ------------------
  551|     13|  default:
  ------------------
  |  Branch (551:3): [True: 13, False: 612k]
  ------------------
  552|     13|    *nextTokPtr = ptr;
  553|     13|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  554|   612k|  }
  555|   650k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   650k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   650k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   650k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|   205k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  59.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 650k]
  |  |  ------------------
  |  |   82|  59.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  59.9k|    /* fall through */                                                         \
  |  |   87|  59.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 25.9k, False: 624k]
  |  |  ------------------
  |  |   88|  58.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 32.9k, False: 617k]
  |  |  ------------------
  |  |   89|  59.4k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 475, False: 650k]
  |  |  ------------------
  |  |   90|  59.6k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 201, False: 650k]
  |  |  ------------------
  |  |   91|  59.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 339, False: 650k]
  |  |  ------------------
  |  |   92|  59.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  59.9k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  59.9k|    break;                                                                     \
  |  |   94|  59.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    364|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 371, False: 650k]
  |  |  |  |  ------------------
  |  |  |  |   71|    371|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 370]
  |  |  |  |  ------------------
  |  |  |  |   72|    364|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    370|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    740|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    370|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 365]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    365|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    365|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 364]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|    370|    ptr += n;                                                                  \
  |  |  |  |   78|    364|    break;
  |  |  ------------------
  |  |   95|    531|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    526|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 531, False: 650k]
  |  |  |  |  ------------------
  |  |  |  |   71|    531|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 530]
  |  |  |  |  ------------------
  |  |  |  |   72|    526|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    530|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.06k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    530|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    529|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    529|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 526]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|    530|    ptr += n;                                                                  \
  |  |  |  |   78|    526|    break;
  |  |  ------------------
  |  |   96|    526|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 24, False: 650k]
  |  |  |  |  ------------------
  |  |  |  |   71|     24|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 22]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     44|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     22|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 21, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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;
  |  |  ------------------
  ------------------
  558|   589k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 589k, False: 60.8k]
  ------------------
  559|   589k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   589k|#  define MINBPC(enc) 1
  ------------------
  560|   589k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   589k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     18|    default:
  ------------------
  |  Branch (561:5): [True: 18, False: 650k]
  ------------------
  562|     18|      *nextTokPtr = ptr;
  563|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  564|   650k|    }
  565|   650k|  }
  566|     47|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     47|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   589k|}
xmltok.c:normal_scanCharRef:
  514|  22.1k|                    const char **nextTokPtr) {
  515|  22.1k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  22.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  22.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  22.1k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 22.1k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  22.1k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  22.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 16.5k, False: 5.62k]
  |  |  ------------------
  ------------------
  517|  16.5k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  16.5k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  16.5k|#  define MINBPC(enc) 1
  ------------------
  518|  5.62k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.62k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.62k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  5.60k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 5.60k, False: 21]
  ------------------
  520|  5.60k|      break;
  521|     21|    default:
  ------------------
  |  Branch (521:5): [True: 21, False: 5.60k]
  ------------------
  522|     21|      *nextTokPtr = ptr;
  523|     21|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  524|  5.62k|    }
  525|  10.6k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  5.60k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  5.02k|#  define MINBPC(enc) 1
  ------------------
  526|  10.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  5.02k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 5.02k, False: 5.59k]
  ------------------
  528|  5.02k|        break;
  529|  5.58k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 5.58k, False: 5.04k]
  ------------------
  530|  5.58k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.58k|#  define MINBPC(enc) 1
  ------------------
  531|  5.58k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  5.58k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     11|      default:
  ------------------
  |  Branch (532:7): [True: 11, False: 10.6k]
  ------------------
  533|     11|        *nextTokPtr = ptr;
  534|     11|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  535|  10.6k|      }
  536|  10.6k|    }
  537|  5.60k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  22.1k|}
xmltok.c:normal_scanHexCharRef:
  483|  16.5k|                       const char **nextTokPtr) {
  484|  16.5k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  16.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  16.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  16.5k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 16.5k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  16.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  16.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  16.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  11.2k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 11.2k, False: 5.28k]
  ------------------
  487|  16.5k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 5.27k, False: 11.2k]
  ------------------
  488|  16.5k|      break;
  489|      9|    default:
  ------------------
  |  Branch (489:5): [True: 9, False: 16.5k]
  ------------------
  490|      9|      *nextTokPtr = ptr;
  491|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  492|  16.5k|    }
  493|  36.7k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  16.5k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  20.2k|#  define MINBPC(enc) 1
  ------------------
  494|  36.7k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  36.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  36.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  6.28k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 6.28k, False: 30.4k]
  ------------------
  496|  20.2k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 13.9k, False: 22.8k]
  ------------------
  497|  20.2k|        break;
  498|  16.5k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 16.5k, False: 20.2k]
  ------------------
  499|  16.5k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  16.5k|#  define MINBPC(enc) 1
  ------------------
  500|  16.5k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  16.5k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     11|      default:
  ------------------
  |  Branch (501:7): [True: 11, False: 36.7k]
  ------------------
  502|     11|        *nextTokPtr = ptr;
  503|     11|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  504|  36.7k|      }
  505|  36.7k|    }
  506|  16.5k|  }
  507|     12|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  16.5k|}
xmltok.c:normal_cdataSectionTok:
  356|  84.6k|                        const char **nextTokPtr) {
  357|  84.6k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 185, False: 84.4k]
  ------------------
  358|    185|    return XML_TOK_NONE;
  ------------------
  |  |   51|    185|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  84.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  84.4k|#  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|  84.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  84.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  84.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  34.9k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 34.9k, False: 49.4k]
  ------------------
  370|  34.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  34.9k|#  define MINBPC(enc) 1
  ------------------
  371|  34.9k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  34.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  34.9k|    {                                                                          \
  |  |  |  |  135|  34.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  34.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  34.9k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 34.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  34.9k|    }
  |  |  ------------------
  ------------------
  372|  34.9k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  34.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 19.1k, False: 15.8k]
  ------------------
  373|  19.1k|      break;
  374|  15.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  15.8k|#  define MINBPC(enc) 1
  ------------------
  375|  15.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  15.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  15.8k|    {                                                                          \
  |  |  |  |  135|  15.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  15.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  15.8k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 15.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  15.8k|    }
  |  |  ------------------
  ------------------
  376|  15.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  15.8k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 14.6k, False: 1.12k]
  ------------------
  377|  14.6k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  14.6k|#  define MINBPC(enc) 1
  ------------------
  378|  14.6k|      break;
  379|  14.6k|    }
  380|  1.12k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.12k|#  define MINBPC(enc) 1
  ------------------
  381|  1.12k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  1.12k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|    727|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 727, False: 83.7k]
  ------------------
  383|    727|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    727|#  define MINBPC(enc) 1
  ------------------
  384|    727|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    727|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    727|    {                                                                          \
  |  |  |  |  135|    727|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    727|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|    727|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 716]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    727|    }
  |  |  ------------------
  ------------------
  385|    716|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|    716|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|    716|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 196, False: 520]
  ------------------
  386|    196|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    196|#  define MINBPC(enc) 1
  ------------------
  387|    716|    *nextTokPtr = ptr;
  388|    716|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    716|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  30.1k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 30.1k, False: 54.3k]
  ------------------
  390|  30.1k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  30.1k|#  define MINBPC(enc) 1
  ------------------
  391|  30.1k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  30.1k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  34.4k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.49k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.48k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.49k, False: 82.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.49k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 1.49k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.48k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.49k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.49k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.49k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 1.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|  1.49k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.48k|    break;
  |  |  ------------------
  |  |   61|  6.08k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.07k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.08k, False: 78.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.08k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 6.08k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.07k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.08k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.08k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 6.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|  6.08k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.07k|    break;
  |  |  ------------------
  |  |   62|  9.65k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  9.64k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 9.65k, False: 74.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  9.65k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 9.65k]
  |  |  |  |  ------------------
  |  |  |  |   51|  9.64k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  9.65k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  9.65k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.65k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 9.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  9.65k|    ptr += n;                                                                  \
  |  |  |  |   57|  9.64k|    break;
  |  |  ------------------
  |  |   63|  9.64k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 10, False: 84.4k]
  |  |  ------------------
  |  |   64|     14|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 4, False: 84.4k]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 84.4k]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  1.38k|  default:
  ------------------
  |  Branch (393:3): [True: 1.38k, False: 83.0k]
  ------------------
  394|  1.38k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.38k|#  define MINBPC(enc) 1
  ------------------
  395|  1.38k|    break;
  396|  84.4k|  }
  397|  5.71M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  5.71M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.71M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.71M|  (((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|  21.5k|      LEAD_CASE(2)
  ------------------
  |  |  400|  21.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 21.5k, False: 5.69M]
  |  |  ------------------
  |  |  401|  21.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  21.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  21.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 3, False: 21.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 5, False: 21.5k]
  |  |  ------------------
  |  |  402|      8|      *nextTokPtr = ptr;                                                       \
  |  |  403|      8|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      8|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      8|    }                                                                          \
  |  |  405|  21.5k|    ptr += n;                                                                  \
  |  |  406|  21.5k|    break;
  ------------------
  408|  5.55M|      LEAD_CASE(3)
  ------------------
  |  |  400|  5.55M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 5.55M, False: 158k]
  |  |  ------------------
  |  |  401|  5.55M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  5.55M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  5.55M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 6, False: 5.55M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 4, False: 5.55M]
  |  |  ------------------
  |  |  402|     10|      *nextTokPtr = ptr;                                                       \
  |  |  403|     10|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     10|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     10|    }                                                                          \
  |  |  405|  5.55M|    ptr += n;                                                                  \
  |  |  406|  5.55M|    break;
  ------------------
  409|  37.7k|      LEAD_CASE(4)
  ------------------
  |  |  400|  37.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 37.7k, False: 5.67M]
  |  |  ------------------
  |  |  401|  37.7k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  37.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  37.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 1, False: 37.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 37.7k]
  |  |  ------------------
  |  |  402|      2|      *nextTokPtr = ptr;                                                       \
  |  |  403|      2|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      2|    }                                                                          \
  |  |  405|  37.7k|    ptr += n;                                                                  \
  |  |  406|  37.7k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|      6|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 6, False: 5.71M]
  ------------------
  412|      9|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 3, False: 5.71M]
  ------------------
  413|     12|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 3, False: 5.71M]
  ------------------
  414|    302|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 290, False: 5.71M]
  ------------------
  415|  27.1k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 26.8k, False: 5.68M]
  ------------------
  416|  52.2k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 25.1k, False: 5.69M]
  ------------------
  417|  52.2k|      *nextTokPtr = ptr;
  418|  52.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  52.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  47.2k|    default:
  ------------------
  |  Branch (419:5): [True: 47.2k, False: 5.66M]
  ------------------
  420|  47.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  47.2k|#  define MINBPC(enc) 1
  ------------------
  421|  47.2k|      break;
  422|  5.71M|    }
  423|  5.71M|  }
  424|    155|  *nextTokPtr = ptr;
  425|    155|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    155|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  52.4k|}
xmltok.c:normal_attributeValueTok:
 1262|   299M|                          const char **nextTokPtr) {
 1263|   299M|  const char *start;
 1264|   299M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 339k, False: 299M]
  ------------------
 1265|   339k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   339k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   299M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   299M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   299M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   299M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 299M]
  ------------------
 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|   299M|  start = ptr;
 1275|  1.00G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.00G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.00G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.00G|  (((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|  22.7M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  22.7M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 22.7M, False: 981M]
  |  |  ------------------
  |  | 1279|  22.7M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  22.7M|    break;
  ------------------
 1282|   469M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   469M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 469M, False: 534M]
  |  |  ------------------
  |  | 1279|   469M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   469M|    break;
  ------------------
 1283|   330k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   330k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 330k, False: 1.00G]
  |  |  ------------------
  |  | 1279|   330k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   330k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   300k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 300k, False: 1.00G]
  ------------------
 1286|   300k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 233k, False: 66.5k]
  ------------------
 1287|   233k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   233k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   233k|#  define MINBPC(enc) 1
  ------------------
 1288|  66.5k|      *nextTokPtr = ptr;
 1289|  66.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  66.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      4|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 4, False: 1.00G]
  ------------------
 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|   233M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 233M, False: 770M]
  ------------------
 1295|   233M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 205M, False: 27.3M]
  ------------------
 1296|   205M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   205M|#  define MINBPC(enc) 1
  ------------------
 1297|   205M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   205M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|   205M|      }
 1299|  27.3M|      *nextTokPtr = ptr;
 1300|  27.3M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  27.3M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  1.11M|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 1.11M, False: 1.00G]
  ------------------
 1302|  1.11M|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 1.00M, False: 109k]
  ------------------
 1303|  1.00M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.00M|#  define MINBPC(enc) 1
  ------------------
 1304|  1.00M|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.00M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.00M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.00M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 443, False: 1.00M]
  ------------------
 1305|    443|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    443|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  1.00M|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.00M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.00M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 329k, False: 679k]
  ------------------
 1307|   329k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   329k|#  define MINBPC(enc) 1
  ------------------
 1308|  1.00M|        *nextTokPtr = ptr;
 1309|  1.00M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.00M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  1.00M|      }
 1311|   109k|      *nextTokPtr = ptr;
 1312|   109k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   109k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  64.4M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 64.4M, False: 939M]
  ------------------
 1314|  64.4M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 43.1M, False: 21.2M]
  ------------------
 1315|  43.1M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  43.1M|#  define MINBPC(enc) 1
  ------------------
 1316|  43.1M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  43.1M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  43.1M|      }
 1318|  21.2M|      *nextTokPtr = ptr;
 1319|  21.2M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  21.2M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   212M|    default:
  ------------------
  |  Branch (1320:5): [True: 212M, False: 791M]
  ------------------
 1321|   212M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   212M|#  define MINBPC(enc) 1
  ------------------
 1322|   212M|      break;
 1323|  1.00G|    }
 1324|  1.00G|  }
 1325|   320k|  *nextTokPtr = ptr;
 1326|   320k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   320k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   299M|}
xmltok.c:normal_entityValueTok:
 1331|  3.36M|                       const char **nextTokPtr) {
 1332|  3.36M|  const char *start;
 1333|  3.36M|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 3.47k, False: 3.36M]
  ------------------
 1334|  3.47k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.47k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  3.36M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  3.36M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.36M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  3.36M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 3.36M]
  ------------------
 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|  3.36M|  start = ptr;
 1344|  11.2M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  11.2M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.2M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|   278k|      LEAD_CASE(2)
  ------------------
  |  | 1347|   278k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 278k, False: 10.9M]
  |  |  ------------------
  |  | 1348|   278k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   278k|    break;
  ------------------
 1351|    594|      LEAD_CASE(3)
  ------------------
  |  | 1347|    594|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 594, False: 11.2M]
  |  |  ------------------
  |  | 1348|    594|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    594|    break;
  ------------------
 1352|    401|      LEAD_CASE(4)
  ------------------
  |  | 1347|    401|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 401, False: 11.2M]
  |  |  ------------------
  |  | 1348|    401|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    401|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  23.0k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 23.0k, False: 11.1M]
  ------------------
 1355|  23.0k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 18.5k, False: 4.50k]
  ------------------
 1356|  18.5k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  18.5k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  18.5k|#  define MINBPC(enc) 1
  ------------------
 1357|  4.50k|      *nextTokPtr = ptr;
 1358|  4.50k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.50k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      8|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 8, False: 11.2M]
  ------------------
 1360|      8|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 6, False: 2]
  ------------------
 1361|      6|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|      6|#define PREFIX(ident) normal_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|      6|#  define MINBPC(enc) 1
  ------------------
 1362|      6|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      6|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 3, False: 3]
  ------------------
 1363|      6|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  2.34M|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 2.34M, False: 8.87M]
  ------------------
 1367|  2.34M|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 2.00M, False: 335k]
  ------------------
 1368|  2.00M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.00M|#  define MINBPC(enc) 1
  ------------------
 1369|  2.00M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.00M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  2.00M|      }
 1371|   335k|      *nextTokPtr = ptr;
 1372|   335k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   335k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   993k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 993k, False: 10.2M]
  ------------------
 1374|   993k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 697k, False: 296k]
  ------------------
 1375|   697k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   697k|#  define MINBPC(enc) 1
  ------------------
 1376|   697k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   697k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   697k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   697k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 272, False: 696k]
  ------------------
 1377|    272|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    272|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   696k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   696k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   696k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 39.6k, False: 657k]
  ------------------
 1379|  39.6k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  39.6k|#  define MINBPC(enc) 1
  ------------------
 1380|   696k|        *nextTokPtr = ptr;
 1381|   696k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   696k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   697k|      }
 1383|   296k|      *nextTokPtr = ptr;
 1384|   296k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   296k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  7.57M|    default:
  ------------------
  |  Branch (1385:5): [True: 7.57M, False: 3.64M]
  ------------------
 1386|  7.57M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.57M|#  define MINBPC(enc) 1
  ------------------
 1387|  7.57M|      break;
 1388|  11.2M|    }
 1389|  11.2M|  }
 1390|  1.37k|  *nextTokPtr = ptr;
 1391|  1.37k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.37k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  3.36M|}
xmltok.c:normal_nameMatchesAscii:
 1715|   117k|                         const char *end1, const char *ptr2) {
 1716|   117k|  UNUSED_P(enc);
  ------------------
  |  |  135|   117k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   475k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   357k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 427k, False: 47.8k]
  ------------------
 1718|   427k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   427k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 33, False: 427k]
  ------------------
 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|     33|      return 0; /* LCOV_EXCL_LINE */
 1725|     33|    }
 1726|   427k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   427k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 69.8k, False: 357k]
  ------------------
 1727|  69.8k|      return 0;
 1728|   427k|  }
 1729|  47.8k|  return ptr1 == end1;
 1730|   117k|}
xmltok.c:normal_nameLength:
 1733|  3.21M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  3.21M|  const char *start = ptr;
 1735|  8.30M|  for (;;) {
 1736|  8.30M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.30M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.30M|  (((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.28k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  5.28k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 5.28k, False: 8.29M]
  |  |  ------------------
  |  | 1739|  5.28k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  5.28k|    break;
  ------------------
 1742|   760k|      LEAD_CASE(3)
  ------------------
  |  | 1738|   760k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 760k, False: 7.54M]
  |  |  ------------------
  |  | 1739|   760k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|   760k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 8.30M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 0, False: 8.30M]
  ------------------
 1746|   873k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 873k, False: 7.43M]
  ------------------
 1747|   873k|#  ifdef XML_NS
 1748|   873k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 8.30M]
  ------------------
 1749|   873k|#  endif
 1750|  4.24M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.37M, False: 4.93M]
  ------------------
 1751|  4.30M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 51.8k, False: 8.25M]
  ------------------
 1752|  4.30M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 7.37k, False: 8.29M]
  ------------------
 1753|  4.32M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 14.9k, False: 8.29M]
  ------------------
 1754|  4.32M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.32M|#  define MINBPC(enc) 1
  ------------------
 1755|  4.32M|      break;
 1756|  3.21M|    default:
  ------------------
  |  Branch (1756:5): [True: 3.21M, False: 5.08M]
  ------------------
 1757|  3.21M|      return (int)(ptr - start);
 1758|  8.30M|    }
 1759|  8.30M|  }
 1760|  3.21M|}
xmltok.c:normal_getAtts:
 1510|  3.19M|                ATTRIBUTE *atts) {
 1511|  3.19M|  enum { other, inName, inValue } state = inName;
 1512|  3.19M|  int nAtts = 0;
 1513|  3.19M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  44.4M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.19M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  41.2M|#  define MINBPC(enc) 1
  ------------------
 1517|  44.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  44.4M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  44.4M|  (((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|  88.9k|      LEAD_CASE(2)
  ------------------
  |  | 1527|  88.9k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 88.9k, False: 44.3M]
  |  |  ------------------
  |  | 1528|  88.9k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  88.9k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 2.74k, False: 86.1k]
  |  |  |  |  ------------------
  |  |  |  | 1520|  2.74k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 1.97k, False: 763]
  |  |  |  |  ------------------
  |  |  |  | 1521|  1.97k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  1.97k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  1.97k|      }                                                                        \
  |  |  |  | 1524|  2.74k|      state = inName;                                                          \
  |  |  |  | 1525|  2.74k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  88.9k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  88.9k|    break;
  ------------------
 1531|  3.47M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  3.47M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 3.47M, False: 40.9M]
  |  |  ------------------
  |  | 1528|  3.47M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  3.47M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 1.28k, False: 3.47M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  1.28k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 977, False: 308]
  |  |  |  |  ------------------
  |  |  |  | 1521|    977|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|    977|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|    977|      }                                                                        \
  |  |  |  | 1524|  1.28k|      state = inName;                                                          \
  |  |  |  | 1525|  1.28k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  3.47M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  3.47M|    break;
  ------------------
 1532|    933|      LEAD_CASE(4)
  ------------------
  |  | 1527|    933|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 933, False: 44.4M]
  |  |  ------------------
  |  | 1528|    933|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|    933|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 933]
  |  |  |  |  ------------------
  |  |  |  | 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|    933|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|    933|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 44.4M]
  ------------------
 1535|  7.26M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 7.26M, False: 37.1M]
  ------------------
 1536|  10.7M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 3.45M, False: 41.0M]
  ------------------
 1537|  10.7M|      START_NAME
  ------------------
  |  | 1519|  10.7M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 5.08M, False: 5.63M]
  |  |  ------------------
  |  | 1520|  5.08M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 2.55M, False: 2.53M]
  |  |  ------------------
  |  | 1521|  2.55M|        atts[nAtts].name = ptr;                                                \
  |  | 1522|  2.55M|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|  2.55M|      }                                                                        \
  |  | 1524|  5.08M|      state = inName;                                                          \
  |  | 1525|  5.08M|    }
  ------------------
 1538|  10.7M|      break;
 1539|      0|#  undef START_NAME
 1540|   436k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 436k, False: 44.0M]
  ------------------
 1541|   436k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 135k, False: 301k]
  ------------------
 1542|   135k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 77.3k, False: 57.8k]
  ------------------
 1543|  77.3k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  77.3k|#  define MINBPC(enc) 1
  ------------------
 1544|   135k|        state = inValue;
 1545|   135k|        open = BT_QUOT;
 1546|   301k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 135k, False: 165k]
  ------------------
 1547|   135k|        state = other;
 1548|   135k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 77.3k, False: 57.8k]
  ------------------
 1549|  77.3k|          atts[nAtts].valueEnd = ptr;
 1550|   135k|        nAtts++;
 1551|   135k|      }
 1552|   436k|      break;
 1553|  9.91M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 9.91M, False: 34.5M]
  ------------------
 1554|  9.91M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 4.95M, False: 4.95M]
  ------------------
 1555|  4.95M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 2.48M, False: 2.47M]
  ------------------
 1556|  2.48M|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.48M|#  define MINBPC(enc) 1
  ------------------
 1557|  4.95M|        state = inValue;
 1558|  4.95M|        open = BT_APOS;
 1559|  4.95M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 4.95M, False: 1.48k]
  ------------------
 1560|  4.95M|        state = other;
 1561|  4.95M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 2.48M, False: 2.47M]
  ------------------
 1562|  2.48M|          atts[nAtts].valueEnd = ptr;
 1563|  4.95M|        nAtts++;
 1564|  4.95M|      }
 1565|  9.91M|      break;
 1566|  55.2k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 55.2k, False: 44.4M]
  ------------------
 1567|  55.2k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 48.2k, False: 7.00k]
  ------------------
 1568|  48.2k|        atts[nAtts].normalized = 0;
 1569|  55.2k|      break;
 1570|  4.27M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 4.27M, False: 40.1M]
  ------------------
 1571|  4.27M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 13.8k, False: 4.26M]
  ------------------
 1572|  13.8k|        state = other;
 1573|  4.26M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 437k, False: 3.82M]
  |  Branch (1573:36): [True: 407k, False: 30.6k]
  |  Branch (1573:55): [True: 33.4k, False: 373k]
  ------------------
 1574|  4.26M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 4.03k, False: 29.4k]
  ------------------
 1575|  33.4k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  29.4k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  62.8k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 28.4k, False: 954]
  ------------------
 1576|  33.4k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|    954|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  34.4k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 319, False: 635]
  ------------------
 1577|  33.4k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|    635|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|    635|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 368, False: 267]
  ------------------
 1578|  33.1k|        atts[nAtts].normalized = 0;
 1579|  4.27M|      break;
 1580|  3.40M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 3.40M, False: 41.0M]
  ------------------
 1581|  4.51M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 1.10M, False: 43.3M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  4.51M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 29.3k, False: 4.48M]
  ------------------
 1585|  29.3k|        state = other;
 1586|  4.48M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 1.88M, False: 2.60M]
  |  Branch (1586:36): [True: 1.88M, False: 1.83k]
  ------------------
 1587|  1.88M|        atts[nAtts].normalized = 0;
 1588|  4.51M|      break;
 1589|  3.17M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 3.17M, False: 41.2M]
  ------------------
 1590|  3.20M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 28.5k, False: 44.4M]
  ------------------
 1591|  3.20M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 3.19M, False: 14.9k]
  ------------------
 1592|  3.19M|        return nAtts;
 1593|  14.9k|      break;
 1594|  7.76M|    default:
  ------------------
  |  Branch (1594:5): [True: 7.76M, False: 36.7M]
  ------------------
 1595|  7.76M|      break;
 1596|  44.4M|    }
 1597|  44.4M|  }
 1598|       |  /* not reached */
 1599|  3.19M|}
xmltok.c:normal_charRefNumber:
 1602|  9.36k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  9.36k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  9.36k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.36k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  9.36k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  9.36k|#  define MINBPC(enc) 1
  ------------------
 1607|  9.36k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  9.36k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.13k, False: 3.23k]
  |  |  ------------------
  ------------------
 1608|  25.5k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  6.13k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|  25.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 19.4k, False: 6.09k]
  ------------------
 1609|  19.4k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  19.3k|#  define MINBPC(enc) 1
  ------------------
 1610|  19.4k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  19.4k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|  19.4k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 19.4k]
  ------------------
 1612|  1.00k|      case ASCII_0:
  ------------------
  |  |   90|  1.00k|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 1.00k, False: 18.4k]
  ------------------
 1613|  2.75k|      case ASCII_1:
  ------------------
  |  |   91|  2.75k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 1.75k, False: 17.6k]
  ------------------
 1614|  3.32k|      case ASCII_2:
  ------------------
  |  |   92|  3.32k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 574, False: 18.8k]
  ------------------
 1615|  4.93k|      case ASCII_3:
  ------------------
  |  |   93|  4.93k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 1.60k, False: 17.8k]
  ------------------
 1616|  5.40k|      case ASCII_4:
  ------------------
  |  |   94|  5.40k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 470, False: 18.9k]
  ------------------
 1617|  5.75k|      case ASCII_5:
  ------------------
  |  |   95|  5.75k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 357, False: 19.0k]
  ------------------
 1618|  6.33k|      case ASCII_6:
  ------------------
  |  |   96|  6.33k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 580, False: 18.8k]
  ------------------
 1619|  6.57k|      case ASCII_7:
  ------------------
  |  |   97|  6.57k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 235, False: 19.1k]
  ------------------
 1620|  6.99k|      case ASCII_8:
  ------------------
  |  |   98|  6.99k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 424, False: 18.9k]
  ------------------
 1621|  7.70k|      case ASCII_9:
  ------------------
  |  |   99|  7.70k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 708, False: 18.6k]
  ------------------
 1622|  7.70k|        result <<= 4;
 1623|  7.70k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  7.70k|#define ASCII_0 0x30
  ------------------
 1624|  7.70k|        break;
 1625|    354|      case ASCII_A:
  ------------------
  |  |   36|    354|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 354, False: 19.0k]
  ------------------
 1626|  2.32k|      case ASCII_B:
  ------------------
  |  |   37|  2.32k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 1.97k, False: 17.4k]
  ------------------
 1627|  2.55k|      case ASCII_C:
  ------------------
  |  |   38|  2.55k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 229, False: 19.1k]
  ------------------
 1628|  3.77k|      case ASCII_D:
  ------------------
  |  |   39|  3.77k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 1.21k, False: 18.1k]
  ------------------
 1629|  3.98k|      case ASCII_E:
  ------------------
  |  |   40|  3.98k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 207, False: 19.1k]
  ------------------
 1630|  4.47k|      case ASCII_F:
  ------------------
  |  |   41|  4.47k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 495, False: 18.9k]
  ------------------
 1631|  4.47k|        result <<= 4;
 1632|  4.47k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  4.47k|#define ASCII_A 0x41
  ------------------
 1633|  4.47k|        break;
 1634|  1.18k|      case ASCII_a:
  ------------------
  |  |   63|  1.18k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 1.18k, False: 18.2k]
  ------------------
 1635|  3.37k|      case ASCII_b:
  ------------------
  |  |   64|  3.37k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 2.18k, False: 17.2k]
  ------------------
 1636|  4.46k|      case ASCII_c:
  ------------------
  |  |   65|  4.46k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 1.08k, False: 18.3k]
  ------------------
 1637|  5.47k|      case ASCII_d:
  ------------------
  |  |   66|  5.47k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 1.01k, False: 18.3k]
  ------------------
 1638|  6.18k|      case ASCII_e:
  ------------------
  |  |   67|  6.18k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 713, False: 18.6k]
  ------------------
 1639|  7.22k|      case ASCII_f:
  ------------------
  |  |   68|  7.22k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 1.03k, False: 18.3k]
  ------------------
 1640|  7.22k|        result <<= 4;
 1641|  7.22k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  7.22k|#define ASCII_a 0x61
  ------------------
 1642|  7.22k|        break;
 1643|  19.4k|      }
 1644|  19.4k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 39, False: 19.3k]
  ------------------
 1645|     39|        return -1;
 1646|  19.4k|    }
 1647|  6.13k|  } else {
 1648|  9.62k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  9.62k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  6.39k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 6.39k, False: 3.22k]
  ------------------
 1649|  6.39k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  6.39k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  6.39k|      result *= 10;
 1651|  6.39k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  6.39k|#define ASCII_0 0x30
  ------------------
 1652|  6.39k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 8, False: 6.39k]
  ------------------
 1653|      8|        return -1;
 1654|  6.39k|    }
 1655|  3.23k|  }
 1656|  9.32k|  return checkCharRefNumber(result);
 1657|  9.36k|}
xmltok.c:normal_predefinedEntityName:
 1661|   540k|                             const char *end) {
 1662|   540k|  UNUSED_P(enc);
  ------------------
  |  |  135|   540k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|   540k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|   540k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 524k, False: 16.3k]
  ------------------
 1664|  10.9k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 10.9k, False: 530k]
  ------------------
 1665|  10.9k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  10.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 655, False: 10.3k]
  |  |  ------------------
  ------------------
 1666|    655|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    655|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 296, False: 359]
  |  |  ------------------
  ------------------
 1667|     81|      case ASCII_l:
  ------------------
  |  |   74|     81|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 81, False: 574]
  ------------------
 1668|     81|        return ASCII_LT;
  ------------------
  |  |  111|     81|#define ASCII_LT 0x3C
  ------------------
 1669|    278|      case ASCII_g:
  ------------------
  |  |   69|    278|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 278, False: 377]
  ------------------
 1670|    278|        return ASCII_GT;
  ------------------
  |  |  113|    278|#define ASCII_GT 0x3E
  ------------------
 1671|    655|      }
 1672|    655|    }
 1673|  10.5k|    break;
 1674|  10.5k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.61k, False: 539k]
  ------------------
 1675|  1.61k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.61k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 937, False: 676]
  |  |  ------------------
  ------------------
 1676|    937|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    937|#  define MINBPC(enc) 1
  ------------------
 1677|    937|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    937|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 719, False: 218]
  |  |  ------------------
  ------------------
 1678|    719|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    719|#  define MINBPC(enc) 1
  ------------------
 1679|    719|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    719|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 517, False: 202]
  |  |  ------------------
  ------------------
 1680|    517|          return ASCII_AMP;
  ------------------
  |  |  105|    517|#define ASCII_AMP 0x26
  ------------------
 1681|    719|      }
 1682|    937|    }
 1683|  1.09k|    break;
 1684|  3.73k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.73k, False: 537k]
  ------------------
 1685|  3.73k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  3.73k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 1.51k, False: 2.22k]
  |  |  ------------------
  ------------------
 1686|  1.28k|    case ASCII_q:
  ------------------
  |  |   79|  1.28k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.28k, False: 2.45k]
  ------------------
 1687|  1.28k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.28k|#  define MINBPC(enc) 1
  ------------------
 1688|  1.28k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|  1.28k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.07k, False: 208]
  |  |  ------------------
  ------------------
 1689|  1.07k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.07k|#  define MINBPC(enc) 1
  ------------------
 1690|  1.07k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|  1.07k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 698, False: 374]
  |  |  ------------------
  ------------------
 1691|    698|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    698|#  define MINBPC(enc) 1
  ------------------
 1692|    698|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|    698|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 491, False: 207]
  |  |  ------------------
  ------------------
 1693|    491|            return ASCII_QUOT;
  ------------------
  |  |  104|    491|#define ASCII_QUOT 0x22
  ------------------
 1694|    698|        }
 1695|  1.07k|      }
 1696|    789|      break;
 1697|    948|    case ASCII_a:
  ------------------
  |  |   63|    948|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 948, False: 2.79k]
  ------------------
 1698|    948|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    948|#  define MINBPC(enc) 1
  ------------------
 1699|    948|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|    948|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 740, False: 208]
  |  |  ------------------
  ------------------
 1700|    740|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    740|#  define MINBPC(enc) 1
  ------------------
 1701|    740|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    740|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 402, False: 338]
  |  |  ------------------
  ------------------
 1702|    402|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    402|#  define MINBPC(enc) 1
  ------------------
 1703|    402|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|    402|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 202, False: 200]
  |  |  ------------------
  ------------------
 1704|    202|            return ASCII_APOS;
  ------------------
  |  |  106|    202|#define ASCII_APOS 0x27
  ------------------
 1705|    402|        }
 1706|    740|      }
 1707|    746|      break;
 1708|  3.73k|    }
 1709|   540k|  }
 1710|   539k|  return 0;
 1711|   540k|}
xmltok.c:normal_updatePosition:
 1779|  4.83k|                       POSITION *pos) {
 1780|  8.27M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  8.27M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.27M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.27M|  (((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|  87.7k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  87.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 87.7k, False: 8.18M]
  |  |  ------------------
  |  | 1784|  87.7k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  87.7k|    pos->columnNumber++;                                                       \
  |  | 1786|  87.7k|    break;
  ------------------
 1788|  6.53k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  6.53k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 6.53k, False: 8.26M]
  |  |  ------------------
  |  | 1784|  6.53k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  6.53k|    pos->columnNumber++;                                                       \
  |  | 1786|  6.53k|    break;
  ------------------
 1789|    539|      LEAD_CASE(4)
  ------------------
  |  | 1783|    539|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 539, False: 8.27M]
  |  |  ------------------
  |  | 1784|    539|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|    539|    pos->columnNumber++;                                                       \
  |  | 1786|    539|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|   646k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 646k, False: 7.62M]
  ------------------
 1792|   646k|      pos->columnNumber = 0;
 1793|   646k|      pos->lineNumber++;
 1794|   646k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   646k|#  define MINBPC(enc) 1
  ------------------
 1795|   646k|      break;
 1796|   262k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 262k, False: 8.01M]
  ------------------
 1797|   262k|      pos->lineNumber++;
 1798|   262k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   262k|#  define MINBPC(enc) 1
  ------------------
 1799|   262k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|   262k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   524k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   262k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 262k, False: 73]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   262k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   262k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 11.7k, False: 250k]
  ------------------
 1800|  11.7k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  11.7k|#  define MINBPC(enc) 1
  ------------------
 1801|   262k|      pos->columnNumber = 0;
 1802|   262k|      break;
 1803|  7.27M|    default:
  ------------------
  |  Branch (1803:5): [True: 7.27M, False: 1.00M]
  ------------------
 1804|  7.27M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.27M|#  define MINBPC(enc) 1
  ------------------
 1805|  7.27M|      pos->columnNumber++;
 1806|  7.27M|      break;
 1807|  8.27M|    }
 1808|  8.27M|  }
 1809|  4.83k|}
xmltok.c:normal_isPublicId:
 1450|  2.56k|                   const char **badPtr) {
 1451|  2.56k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.56k|#  define MINBPC(enc) 1
  ------------------
 1452|  2.56k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  2.56k|#  define MINBPC(enc) 1
  ------------------
 1453|  19.2k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  19.2k|#  define MINBPC(enc) 1
  ------------------
 1454|  19.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  19.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  19.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|  1.56k|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 1.56k, False: 17.6k]
  ------------------
 1456|  4.69k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 3.12k, False: 16.0k]
  ------------------
 1457|  5.49k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 796, False: 18.4k]
  ------------------
 1458|  5.69k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 201, False: 19.0k]
  ------------------
 1459|  5.89k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 197, False: 19.0k]
  ------------------
 1460|  6.08k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 194, False: 19.0k]
  ------------------
 1461|  6.32k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 240, False: 18.9k]
  ------------------
 1462|  6.56k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 236, False: 18.9k]
  ------------------
 1463|  6.86k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 305, False: 18.9k]
  ------------------
 1464|  11.3k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 4.52k, False: 14.6k]
  ------------------
 1465|  11.6k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 215, False: 18.9k]
  ------------------
 1466|  12.1k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 543, False: 18.6k]
  ------------------
 1467|  13.1k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 977, False: 18.2k]
  ------------------
 1468|  13.3k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 217, False: 18.9k]
  ------------------
 1469|  13.8k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 505, False: 18.7k]
  ------------------
 1470|  14.1k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 296, False: 18.9k]
  ------------------
 1471|  14.6k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 472, False: 18.7k]
  ------------------
 1472|  15.0k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 436, False: 18.7k]
  ------------------
 1473|  15.0k|#  ifdef XML_NS
 1474|  15.0k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 19.2k]
  ------------------
 1475|  15.0k|#  endif
 1476|  15.0k|      break;
 1477|    541|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 541, False: 18.6k]
  ------------------
 1478|    541|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    541|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 540]
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    540|      break;
 1483|    907|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 907, False: 18.3k]
  ------------------
 1484|  2.96k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 2.05k, False: 17.1k]
  ------------------
 1485|  2.96k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  2.96k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 2.96k, False: 0]
  ------------------
 1486|  2.96k|        break;
 1487|       |      /* fall through */
 1488|    654|    default:
  ------------------
  |  Branch (1488:5): [True: 654, False: 18.5k]
  ------------------
 1489|    654|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    654|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    444|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 444, False: 210]
  ------------------
 1491|    645|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 201, False: 453]
  ------------------
 1492|    645|        break;
 1493|      9|      default:
  ------------------
  |  Branch (1493:7): [True: 9, False: 645]
  ------------------
 1494|      9|        *badPtr = ptr;
 1495|      9|        return 0;
 1496|    654|      }
 1497|    645|      break;
 1498|  19.2k|    }
 1499|  19.2k|  }
 1500|  2.55k|  return 1;
 1501|  2.56k|}
xmltok.c:little2_prologTok:
 1018|   206k|                  const char **nextTokPtr) {
 1019|   206k|  int tok;
 1020|   206k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 371, False: 206k]
  ------------------
 1021|    371|    return XML_TOK_NONE;
  ------------------
  |  |   51|    371|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|   206k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|   206k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|   206k|    size_t n = end - ptr;
 1024|   206k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|   206k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 43.7k, False: 162k]
  ------------------
 1025|  43.7k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  43.7k|#  define MINBPC(enc) 2
  ------------------
 1026|  43.7k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 13, False: 43.7k]
  ------------------
 1027|     13|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  43.7k|      end = ptr + n;
 1029|  43.7k|    }
 1030|   206k|  }
 1031|   206k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   206k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   206k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   202k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 202k, False: 3.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|    869|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 869, False: 205k]
  ------------------
 1033|    869|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    869|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    869|#  define MINBPC(enc) 2
  ------------------
 1034|  12.6k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 12.6k, False: 193k]
  ------------------
 1035|  12.6k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  12.6k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  12.6k|#  define MINBPC(enc) 2
  ------------------
 1036|  13.3k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 13.3k, False: 192k]
  ------------------
 1037|  13.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.3k|#  define MINBPC(enc) 2
  ------------------
 1038|  13.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.3k|    {                                                                          \
  |  |  |  |  135|  13.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  13.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 13.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  13.3k|    }
  |  |  ------------------
  ------------------
 1039|  13.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 6, False: 13.3k]
  |  |  |  |  |  Branch (737:4): [True: 11.6k, False: 1.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.28k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.28k, False: 6.08k]
  ------------------
 1041|  7.28k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  7.28k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  7.28k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.16k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.16k, False: 11.2k]
  ------------------
 1043|  2.16k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.16k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.16k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.18k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.18k, False: 12.1k]
  ------------------
 1045|  2.21k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.02k, False: 12.3k]
  ------------------
 1046|  3.89k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.67k, False: 11.6k]
  ------------------
 1047|  3.89k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 13.3k]
  ------------------
 1048|  3.89k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 13.3k]
  ------------------
 1049|  3.91k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 22, False: 13.3k]
  ------------------
 1050|  3.91k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.91k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.91k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.91k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  13.3k|    }
 1053|      6|    *nextTokPtr = ptr;
 1054|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
 1055|  13.3k|  }
 1056|  5.20k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 5.20k, False: 200k]
  ------------------
 1057|  5.20k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  5.20k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 68, False: 5.13k]
  ------------------
 1058|     68|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     68|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     68|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     68|    }
 1062|       |    /* fall through */
 1063|  78.2k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 73.1k, False: 132k]
  ------------------
 1064|  82.6k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 4.32k, False: 201k]
  ------------------
 1065|  92.6k|    for (;;) {
 1066|  92.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  92.6k|#  define MINBPC(enc) 2
  ------------------
 1067|  92.6k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  92.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  92.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  92.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 196, False: 92.4k]
  ------------------
 1068|    196|        break;
 1069|  92.4k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  92.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  92.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  90.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 90.4k, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  8.32k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 8.32k, False: 84.1k]
  ------------------
 1071|  9.35k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.02k, False: 91.4k]
  ------------------
 1072|  9.35k|        break;
 1073|    736|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 736, False: 91.7k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    736|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    736|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 731, False: 5]
  ------------------
 1076|    731|          break;
 1077|       |        /* fall through */
 1078|  82.4k|      default:
  ------------------
  |  Branch (1078:7): [True: 82.4k, False: 10.0k]
  ------------------
 1079|  82.4k|        *nextTokPtr = ptr;
 1080|  82.4k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  82.4k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  92.4k|      }
 1082|  92.4k|    }
 1083|    196|    *nextTokPtr = ptr;
 1084|    196|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    196|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  1.61k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 1.61k, False: 204k]
  ------------------
 1086|  1.61k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.61k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.61k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.62k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.62k, False: 203k]
  ------------------
 1088|  2.62k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.62k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.62k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.62k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.39k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.39k, False: 204k]
  ------------------
 1091|  1.39k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.39k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.39k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.39k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    799|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 799, False: 205k]
  ------------------
 1094|    799|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    799|#  define MINBPC(enc) 2
  ------------------
 1095|    799|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    799|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    799|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    799|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 5, False: 794]
  ------------------
 1096|      5|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      5|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    794|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    794|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    794|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 785, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 40, False: 745]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     40|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     40|    {                                                                          \
  |  |  135|     40|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     40|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     40|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 39]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     40|    }
  ------------------
 1099|     39|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     39|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     39|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 22, False: 17]
  |  |  |  |  |  Branch (739:52): [True: 3, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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|     39|    }
 1104|    790|    *nextTokPtr = ptr;
 1105|    790|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    790|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.73k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.73k, False: 201k]
  ------------------
 1107|  4.73k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.73k|#  define MINBPC(enc) 2
  ------------------
 1108|  4.73k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.73k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.90k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.90k, False: 202k]
  ------------------
 1110|  3.90k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.90k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.90k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.90k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.90k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.90k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 6, False: 3.90k]
  ------------------
 1112|      6|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      6|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.90k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.90k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.90k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.86k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 41, False: 3.85k]
  |  |  |  |  |  Branch (737:4): [True: 3.86k, False: 35]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    863|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 863, False: 3.03k]
  ------------------
 1115|    863|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    863|#  define MINBPC(enc) 2
  ------------------
 1116|    863|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    863|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    207|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 207, False: 3.69k]
  ------------------
 1118|    207|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    207|#  define MINBPC(enc) 2
  ------------------
 1119|    207|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    207|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    257|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 257, False: 3.64k]
  ------------------
 1121|    257|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    257|#  define MINBPC(enc) 2
  ------------------
 1122|    257|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    257|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    194|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 194, False: 3.70k]
  ------------------
 1124|    281|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 87, False: 3.81k]
  ------------------
 1125|    495|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 214, False: 3.68k]
  ------------------
 1126|    943|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 448, False: 3.45k]
  ------------------
 1127|  1.43k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 490, False: 3.41k]
  ------------------
 1128|  2.14k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 709, False: 3.19k]
  ------------------
 1129|  2.53k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 390, False: 3.51k]
  ------------------
 1130|  2.53k|      *nextTokPtr = ptr;
 1131|  2.53k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  2.53k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.90k|    }
 1133|     41|    *nextTokPtr = ptr;
 1134|     41|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     41|#define XML_TOK_INVALID 0
  ------------------
 1135|  4.25k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 4.25k, False: 201k]
  ------------------
 1136|  4.25k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.25k|#  define MINBPC(enc) 2
  ------------------
 1137|  4.25k|    return XML_TOK_OR;
  ------------------
  |  |   88|  4.25k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.32k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.32k, False: 200k]
  ------------------
 1139|  5.32k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.32k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.32k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.32k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  13.0k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 13.0k, False: 192k]
  ------------------
 1142|  13.0k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  13.0k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  13.0k|#  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: 206k]
  |  |  ------------------
  |  | 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: 206k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|     77|    LEAD_CASE(4)
  ------------------
  |  | 1144|     18|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 23, False: 206k]
  |  |  ------------------
  |  | 1145|     23|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 18]
  |  |  ------------------
  |  | 1146|     18|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     18|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     18|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|     18|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     18|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     18|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     18|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     18|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  27.6k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 27.6k, False: 178k]
  ------------------
 1168|  54.7k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 27.1k, False: 178k]
  ------------------
 1169|  54.7k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  54.7k|#define XML_TOK_NAME 18
  ------------------
 1170|  54.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  54.7k|#  define MINBPC(enc) 2
  ------------------
 1171|  54.7k|    break;
 1172|    216|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 216, False: 205k]
  ------------------
 1173|    438|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 222, False: 205k]
  ------------------
 1174|    698|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 260, False: 205k]
  ------------------
 1175|    698|#  ifdef XML_NS
 1176|    698|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 206k]
  ------------------
 1177|    698|#  endif
 1178|    698|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    698|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    698|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    698|#  define MINBPC(enc) 2
  ------------------
 1180|    698|    break;
 1181|  3.24k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 3.24k, False: 202k]
  ------------------
 1182|  3.24k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  3.24k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  3.24k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  3.24k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 3.00k, False: 237]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  3.00k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.00k|#  define MINBPC(enc) 2
  ------------------
 1184|  3.00k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  3.00k|#define XML_TOK_NAME 18
  ------------------
 1185|  3.00k|      break;
 1186|  3.00k|    }
 1187|    237|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    237|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    237|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    237|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 198, False: 39]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    198|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    198|#  define MINBPC(enc) 2
  ------------------
 1189|    198|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    198|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    198|      break;
 1191|    198|    }
 1192|       |    /* fall through */
 1193|     59|  default:
  ------------------
  |  Branch (1193:3): [True: 20, False: 206k]
  ------------------
 1194|     59|    *nextTokPtr = ptr;
 1195|     59|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     59|#define XML_TOK_INVALID 0
  ------------------
 1196|   206k|  }
 1197|   183k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|   183k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   183k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   183k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   177k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 177k, False: 5.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   432k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   124k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 5.70k, False: 177k]
  |  |  ------------------
  |  |   82|   124k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  5.70k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  5.70k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  5.70k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 27, False: 5.67k]
  |  |  ------------------
  |  |   83|     27|      *nextTokPtr = ptr;                                                       \
  |  |   84|     27|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     27|    }                                                                          \
  |  |   86|   124k|    /* fall through */                                                         \
  |  |   87|   124k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 48.5k, False: 134k]
  |  |  ------------------
  |  |   88|   123k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 69.5k, False: 113k]
  |  |  ------------------
  |  |   89|   124k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 205, False: 182k]
  |  |  ------------------
  |  |   90|   124k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 226, False: 182k]
  |  |  ------------------
  |  |   91|   124k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 305, False: 182k]
  |  |  ------------------
  |  |   92|   124k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   124k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   124k|    break;                                                                     \
  |  |   94|   124k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 183k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 183k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     22|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 183k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      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;
  |  |  ------------------
  ------------------
 1200|    206|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 206, False: 182k]
  ------------------
 1201|  1.97k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.76k, False: 181k]
  ------------------
 1202|  2.88k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 913, False: 182k]
  ------------------
 1203|  4.17k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.28k, False: 181k]
  ------------------
 1204|  5.19k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 1.02k, False: 182k]
  ------------------
 1205|  5.20k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 2, False: 183k]
  ------------------
 1206|  51.6k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 46.4k, False: 136k]
  ------------------
 1207|  53.7k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 2.07k, False: 181k]
  ------------------
 1208|  55.7k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.03k, False: 181k]
  ------------------
 1209|  55.7k|      *nextTokPtr = ptr;
 1210|  55.7k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 183k]
  ------------------
 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|    195|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 195, False: 182k]
  ------------------
 1232|    195|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    195|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 194]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    194|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    194|#  define MINBPC(enc) 2
  ------------------
 1237|    194|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    194|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    424|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 424, False: 182k]
  ------------------
 1239|    424|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    424|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 423]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    423|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    423|#  define MINBPC(enc) 2
  ------------------
 1244|    423|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    423|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|  2.07k|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 2.07k, False: 181k]
  ------------------
 1246|  2.07k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  2.07k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 2.07k]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|  2.07k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.07k|#  define MINBPC(enc) 2
  ------------------
 1251|  2.07k|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|  2.07k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|      7|    default:
  ------------------
  |  Branch (1252:5): [True: 7, False: 183k]
  ------------------
 1253|      7|      *nextTokPtr = ptr;
 1254|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
 1255|   183k|    }
 1256|   183k|  }
 1257|    163|  return -tok;
 1258|  58.6k|}
xmltok.c:little2_scanLit:
  984|  13.5k|                const char **nextTokPtr) {
  985|  32.5M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  32.5M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  32.5M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  32.5M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   231k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 231k, False: 32.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  32.5M|    switch (t) {
  988|   241k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 32.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 32.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|   120k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   120k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 120k, False: 32.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|   120k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 32, False: 120k]
  |  |  |  |  ------------------
  |  |  |  |   51|   120k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     32|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   120k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   120k|#    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|   120k|    ptr += n;                                                                  \
  |  |  |  |   57|   120k|    break;
  |  |  ------------------
  |  |   63|   120k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 32.5M]
  |  |  ------------------
  |  |   64|     14|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 32.5M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 32.5M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  7.30k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 7.30k, False: 32.5M]
  ------------------
  990|  20.6k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 13.3k, False: 32.5M]
  ------------------
  991|  20.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  20.6k|#  define MINBPC(enc) 2
  ------------------
  992|  20.6k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 7.23k, False: 13.3k]
  ------------------
  993|  7.23k|        break;
  994|  13.3k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  13.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  13.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  13.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 13.3k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  13.3k|      *nextTokPtr = ptr;
  997|  13.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 13.3k, False: 35]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  8.88k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 8.88k, False: 4.50k]
  ------------------
  999|  9.91k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.03k, False: 12.3k]
  ------------------
 1000|  10.2k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 386, False: 12.9k]
  ------------------
 1001|  13.3k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 3.00k, False: 10.3k]
  ------------------
 1002|  13.3k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 35, False: 13.3k]
  ------------------
 1003|  13.3k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 6, False: 13.3k]
  ------------------
 1004|  13.3k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  13.3k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     42|      default:
  ------------------
  |  Branch (1005:7): [True: 42, False: 13.3k]
  ------------------
 1006|     42|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
 1007|  13.3k|      }
 1008|  32.4M|    default:
  ------------------
  |  Branch (1008:5): [True: 32.4M, False: 141k]
  ------------------
 1009|  32.4M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  32.4M|#  define MINBPC(enc) 2
  ------------------
 1010|  32.4M|      break;
 1011|  32.5M|    }
 1012|  32.5M|  }
 1013|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  13.5k|}
xmltok.c:little2_scanDecl:
  183|  7.28k|                 const char **nextTokPtr) {
  184|  7.28k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.28k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.28k|    {                                                                          \
  |  |  |  |  135|  7.28k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.28k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 7.27k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  7.28k|    }
  |  |  ------------------
  ------------------
  185|  7.27k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.27k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.27k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.25k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.25k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    459|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 459, False: 6.81k]
  ------------------
  187|    459|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    459|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    459|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 7.27k]
  ------------------
  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|    444|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 444, False: 6.83k]
  ------------------
  192|  6.79k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.34k, False: 927]
  ------------------
  193|  6.79k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.79k|#  define MINBPC(enc) 2
  ------------------
  194|  6.79k|    break;
  195|     23|  default:
  ------------------
  |  Branch (195:3): [True: 23, False: 7.25k]
  ------------------
  196|     23|    *nextTokPtr = ptr;
  197|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  198|  7.27k|  }
  199|  45.0k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  45.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  45.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  45.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 44.9k, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     37|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 37, False: 44.9k]
  ------------------
  202|     37|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     37|    {                                                                          \
  |  |  135|     37|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     37|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     37|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 35]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     37|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     35|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     35|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     35|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|     12|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 29, False: 6]
  |  |  |  |  |  Branch (737:4): [True: 12, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 34]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 34]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 34]
  ------------------
  208|      6|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 3, False: 32]
  ------------------
  209|      6|        *nextTokPtr = ptr;
  210|      6|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  211|     35|      }
  212|       |      /* fall through */
  213|  4.58k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.55k, False: 40.4k]
  ------------------
  214|  5.76k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.17k, False: 43.8k]
  ------------------
  215|  6.72k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 963, False: 44.0k]
  ------------------
  216|  6.72k|      *nextTokPtr = ptr;
  217|  6.72k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.72k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  31.9k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 31.9k, False: 13.0k]
  ------------------
  219|  38.2k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 6.25k, False: 38.7k]
  ------------------
  220|  38.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  38.2k|#  define MINBPC(enc) 2
  ------------------
  221|  38.2k|      break;
  222|     32|    default:
  ------------------
  |  Branch (222:5): [True: 32, False: 44.9k]
  ------------------
  223|     32|      *nextTokPtr = ptr;
  224|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  225|  45.0k|    }
  226|  45.0k|  }
  227|     28|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.79k|}
xmltok.c:little2_scanComment:
  146|    660|                    const char **nextTokPtr) {
  147|    660|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    660|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    660|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    660|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 648, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    648|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    648|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    648|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 636, False: 12]
  |  |  |  |  |  Branch (739:52): [True: 627, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     21|      *nextTokPtr = ptr;
  150|     21|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  151|     21|    }
  152|    627|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    627|#  define MINBPC(enc) 2
  ------------------
  153|  67.6k|    while (HAS_CHAR(enc, ptr, end)) {
  154|  67.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  67.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  67.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.8k, False: 54.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  4.62k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 67.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 67.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.30k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.27k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.30k, False: 65.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.30k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 33, False: 2.27k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.27k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     33|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.27k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.27k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  2.27k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.27k|    break;
  |  |  ------------------
  |  |   63|  2.27k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 27, False: 67.6k]
  |  |  ------------------
  |  |   64|     27|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 67.6k]
  |  |  ------------------
  |  |   65|     37|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 67.6k]
  |  |  ------------------
  |  |   66|     37|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     37|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     37|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|    956|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 956, False: 66.7k]
  ------------------
  157|    956|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    956|#  define MINBPC(enc) 2
  ------------------
  158|    956|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    956|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    956|    {                                                                          \
  |  |  |  |  135|    956|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    956|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    956|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 955]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    956|    }
  |  |  ------------------
  ------------------
  159|    955|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    955|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    955|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 732, False: 223]
  |  |  |  |  |  Branch (739:52): [True: 489, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    489|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    489|#  define MINBPC(enc) 2
  ------------------
  161|    489|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    489|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    489|    {                                                                          \
  |  |  |  |  135|    489|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    489|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    489|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 488]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    489|    }
  |  |  ------------------
  ------------------
  162|    488|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    488|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    488|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 480, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 469, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     19|            *nextTokPtr = ptr;
  164|     19|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  165|     19|          }
  166|    469|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    469|#  define MINBPC(enc) 2
  ------------------
  167|    469|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    469|#define XML_TOK_COMMENT 13
  ------------------
  168|    488|        }
  169|    466|        break;
  170|  64.3k|      default:
  ------------------
  |  Branch (170:7): [True: 64.3k, False: 3.29k]
  ------------------
  171|  64.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  64.3k|#  define MINBPC(enc) 2
  ------------------
  172|  64.3k|        break;
  173|  67.6k|      }
  174|  67.6k|    }
  175|    627|  }
  176|     79|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     79|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    660|}
xmltok.c:little2_scanPi:
  277|  4.13k|               const char **nextTokPtr) {
  278|  4.13k|  int tok;
  279|  4.13k|  const char *target = ptr;
  280|  4.13k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.13k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.13k|    {                                                                          \
  |  |  |  |  135|  4.13k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.13k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.13k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 4.12k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  4.13k|    }
  |  |  ------------------
  ------------------
  281|  4.12k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.12k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.12k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.14k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.14k, False: 983]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  4.65k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.08k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 955, False: 3.17k]
  |  |  ------------------
  |  |  111|  4.08k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    955|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    955|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    955|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 942]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  4.08k|    /* fall through */                                                         \
  |  |  116|  4.08k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.72k, False: 1.40k]
  |  |  ------------------
  |  |  117|  4.08k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 420, False: 3.70k]
  |  |  ------------------
  |  |  118|  4.08k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  4.08k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  4.08k|    break;                                                                     \
  |  |  120|  4.08k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 4.10k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      7|  default:
  ------------------
  |  Branch (283:3): [True: 7, False: 4.11k]
  ------------------
  284|      7|    *nextTokPtr = ptr;
  285|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  286|  4.12k|  }
  287|  70.5k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  70.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  70.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  70.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.22k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.22k, False: 61.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|   323k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  66.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 61.2k, False: 9.25k]
  |  |  ------------------
  |  |   82|  66.4k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  61.2k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  61.2k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  61.2k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 61.2k]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|  66.4k|    /* fall through */                                                         \
  |  |   87|  66.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.58k, False: 66.9k]
  |  |  ------------------
  |  |   88|  65.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 693, False: 69.8k]
  |  |  ------------------
  |  |   89|  65.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 281, False: 70.2k]
  |  |  ------------------
  |  |   90|  66.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 222, False: 70.2k]
  |  |  ------------------
  |  |   91|  66.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 476, False: 70.0k]
  |  |  ------------------
  |  |   92|  66.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  66.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  66.4k|    break;                                                                     \
  |  |   94|  66.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 70.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: 70.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|     24|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 24, False: 70.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|     24|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 20]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     40|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    681|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 681, False: 69.8k]
  ------------------
  291|  1.36k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 681, False: 69.8k]
  ------------------
  292|  2.07k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 716, False: 69.7k]
  ------------------
  293|  2.07k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.07k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.07k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.07k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.07k|#  define MINBPC(enc) 2
  ------------------
  298|   131k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   131k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   131k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   131k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.5k, False: 120k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  4.25k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 131k]
  |  |  |  |  ------------------
  |  |  |  |   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: 131k]
  |  |  |  |  ------------------
  |  |  |  |   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.13k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.10k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.13k, False: 129k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.13k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 33, False: 2.10k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.10k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     33|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.10k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.10k|#    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.10k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.10k|    break;
  |  |  ------------------
  |  |   63|  2.10k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 11, False: 131k]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 131k]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 131k]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  2.64k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 2.64k, False: 129k]
  ------------------
  302|  2.64k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.64k|#  define MINBPC(enc) 2
  ------------------
  303|  2.64k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.64k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.64k|    {                                                                          \
  |  |  |  |  135|  2.64k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.64k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.64k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 2.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  2.64k|    }
  |  |  ------------------
  ------------------
  304|  2.63k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.63k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.63k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.38k, False: 250]
  |  |  |  |  |  Branch (739:52): [True: 1.89k, False: 492]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  1.89k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.89k|#  define MINBPC(enc) 2
  ------------------
  306|  1.89k|            return tok;
  307|  1.89k|          }
  308|    742|          break;
  309|   127k|        default:
  ------------------
  |  Branch (309:9): [True: 127k, False: 4.79k]
  ------------------
  310|   127k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   127k|#  define MINBPC(enc) 2
  ------------------
  311|   127k|          break;
  312|   131k|        }
  313|   131k|      }
  314|    131|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    131|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  1.88k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 1.88k, False: 68.6k]
  ------------------
  316|  1.88k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  1.88k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 1.88k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  1.88k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.88k|#  define MINBPC(enc) 2
  ------------------
  321|  1.88k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.88k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.88k|    {                                                                          \
  |  |  |  |  135|  1.88k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.88k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.88k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 39, False: 1.84k]
  |  |  |  |  ------------------
  |  |  |  |  136|     39|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     39|      }                                                                        \
  |  |  |  |  138|  1.88k|    }
  |  |  ------------------
  ------------------
  322|  1.84k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.84k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.84k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.83k, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 1.82k, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  1.82k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.82k|#  define MINBPC(enc) 2
  ------------------
  324|  1.82k|        return tok;
  325|  1.82k|      }
  326|       |      /* fall through */
  327|     37|    default:
  ------------------
  |  Branch (327:5): [True: 11, False: 70.4k]
  ------------------
  328|     37|      *nextTokPtr = ptr;
  329|     37|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
  330|  70.5k|    }
  331|  70.5k|  }
  332|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  4.08k|}
xmltok.c:little2_checkPiTarget:
  232|  3.96k|                      int *tokPtr) {
  233|  3.96k|  int upper = 0;
  234|  3.96k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.96k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  3.96k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  3.96k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  3.96k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  3.96k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.53k, False: 2.43k]
  ------------------
  237|  1.53k|    return 1;
  238|  2.43k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.43k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.43k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.93k, False: 495]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.23k|  case ASCII_x:
  ------------------
  |  |   86|  1.23k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.23k, False: 1.19k]
  ------------------
  240|  1.23k|    break;
  241|    695|  case ASCII_X:
  ------------------
  |  |   59|    695|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 695, False: 1.73k]
  ------------------
  242|    695|    upper = 1;
  243|    695|    break;
  244|    501|  default:
  ------------------
  |  Branch (244:3): [True: 501, False: 1.93k]
  ------------------
  245|    501|    return 1;
  246|  2.43k|  }
  247|  1.93k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.93k|#  define MINBPC(enc) 2
  ------------------
  248|  1.93k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.93k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.93k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.52k, False: 413]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    773|  case ASCII_m:
  ------------------
  |  |   75|    773|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 773, False: 1.16k]
  ------------------
  250|    773|    break;
  251|    596|  case ASCII_M:
  ------------------
  |  |   48|    596|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 596, False: 1.33k]
  ------------------
  252|    596|    upper = 1;
  253|    596|    break;
  254|    564|  default:
  ------------------
  |  Branch (254:3): [True: 564, False: 1.36k]
  ------------------
  255|    564|    return 1;
  256|  1.93k|  }
  257|  1.36k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.36k|#  define MINBPC(enc) 2
  ------------------
  258|  1.36k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.36k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.36k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 850, False: 519]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     44|  case ASCII_l:
  ------------------
  |  |   74|     44|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 44, False: 1.32k]
  ------------------
  260|     44|    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.32k|  default:
  ------------------
  |  Branch (264:3): [True: 1.32k, False: 46]
  ------------------
  265|  1.32k|    return 1;
  266|  1.36k|  }
  267|     46|  if (upper)
  ------------------
  |  Branch (267:7): [True: 2, False: 44]
  ------------------
  268|      2|    return 0;
  269|     44|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     44|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     44|  return 1;
  271|     46|}
xmltok.c:little2_scanPercent:
  924|  1.62k|                    const char **nextTokPtr) {
  925|  1.62k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.62k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.62k|    {                                                                          \
  |  |  |  |  135|  1.62k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.62k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.62k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 1.58k]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|  1.62k|    }
  |  |  ------------------
  ------------------
  926|  1.58k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.58k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.58k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.31k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.31k, False: 265]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|    942|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    776|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 244, False: 1.34k]
  |  |  ------------------
  |  |  111|    776|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    244|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    244|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    244|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 17, False: 227]
  |  |  ------------------
  |  |  112|     17|      *nextTokPtr = ptr;                                                       \
  |  |  113|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     17|    }                                                                          \
  |  |  115|    776|    /* fall through */                                                         \
  |  |  116|    776|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 445, False: 1.13k]
  |  |  ------------------
  |  |  117|    776|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 104, False: 1.48k]
  |  |  ------------------
  |  |  118|    776|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|    776|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    776|    break;                                                                     \
  |  |  120|    776|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.58k]
  |  |  |  |  ------------------
  |  |  |  |  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.58k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 1.56k]
  |  |  |  |  ------------------
  |  |  |  |  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|    342|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 342, False: 1.24k]
  ------------------
  929|    409|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 67, False: 1.51k]
  ------------------
  930|    767|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 358, False: 1.22k]
  ------------------
  931|    770|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 1.58k]
  ------------------
  932|    770|    *nextTokPtr = ptr;
  933|    770|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    770|#define XML_TOK_PERCENT 22
  ------------------
  934|      6|  default:
  ------------------
  |  Branch (934:3): [True: 6, False: 1.57k]
  ------------------
  935|      6|    *nextTokPtr = ptr;
  936|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  937|  1.58k|  }
  938|  2.28k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.28k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.28k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.28k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.71k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.71k, False: 572]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  4.82k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.58k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 556, False: 1.73k]
  |  |  ------------------
  |  |   82|  1.58k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    556|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    556|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    556|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 20, False: 536]
  |  |  ------------------
  |  |   83|     20|      *nextTokPtr = ptr;                                                       \
  |  |   84|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     20|    }                                                                          \
  |  |   86|  1.58k|    /* fall through */                                                         \
  |  |   87|  1.58k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 219, False: 2.06k]
  |  |  ------------------
  |  |   88|    950|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 195, False: 2.09k]
  |  |  ------------------
  |  |   89|  1.16k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 217, False: 2.06k]
  |  |  ------------------
  |  |   90|  1.37k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 207, False: 2.07k]
  |  |  ------------------
  |  |   91|  1.58k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 208, False: 2.07k]
  |  |  ------------------
  |  |   92|  1.58k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.58k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.58k|    break;                                                                     \
  |  |   94|  1.58k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.28k]
  |  |  |  |  ------------------
  |  |  |  |   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.28k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     11|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 11, False: 2.27k]
  |  |  |  |  ------------------
  |  |  |  |   71|     11|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|    664|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 664, False: 1.62k]
  ------------------
  942|    664|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    664|#  define MINBPC(enc) 2
  ------------------
  943|    664|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    664|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|      9|    default:
  ------------------
  |  Branch (944:5): [True: 9, False: 2.27k]
  ------------------
  945|      9|      *nextTokPtr = ptr;
  946|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  947|  2.28k|    }
  948|  2.28k|  }
  949|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    776|}
xmltok.c:little2_scanPoundName:
  954|  13.0k|                      const char **nextTokPtr) {
  955|  13.0k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.0k|    {                                                                          \
  |  |  |  |  135|  13.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  13.0k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 13.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  13.0k|    }
  |  |  ------------------
  ------------------
  956|  13.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.9k, False: 93]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  12.5k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  13.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 63, False: 13.0k]
  |  |  ------------------
  |  |  111|  13.0k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     63|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     63|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     63|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 49]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  13.0k|    /* fall through */                                                         \
  |  |  116|  13.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 12.4k, False: 640]
  |  |  ------------------
  |  |  117|  13.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 547, False: 12.5k]
  |  |  ------------------
  |  |  118|  13.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  13.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  13.0k|    break;                                                                     \
  |  |  120|  13.0k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 13.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: 13.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|     25|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 25, False: 13.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     42|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     21|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 13.0k]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|  13.0k|  }
  962|  90.6k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  90.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  90.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  90.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  90.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 90.0k, False: 603]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|   281k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  77.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 587, False: 90.0k]
  |  |  ------------------
  |  |   82|  77.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    587|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    587|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    587|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 566]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  77.6k|    /* fall through */                                                         \
  |  |   87|  77.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 49.1k, False: 41.5k]
  |  |  ------------------
  |  |   88|  76.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 27.2k, False: 63.3k]
  |  |  ------------------
  |  |   89|  77.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 330, False: 90.3k]
  |  |  ------------------
  |  |   90|  77.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 202, False: 90.4k]
  |  |  ------------------
  |  |   91|  77.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 198, False: 90.4k]
  |  |  ------------------
  |  |   92|  77.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  77.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  77.6k|    break;                                                                     \
  |  |   94|  77.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 90.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 90.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     10|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 90.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 6]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     12|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|      6|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    224|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 224, False: 90.4k]
  ------------------
  966|    562|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 338, False: 90.3k]
  ------------------
  967|  12.1k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 11.6k, False: 79.0k]
  ------------------
  968|  12.4k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 238, False: 90.4k]
  ------------------
  969|  12.6k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 195, False: 90.4k]
  ------------------
  970|  12.6k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 90.6k]
  ------------------
  971|  12.9k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 313, False: 90.3k]
  ------------------
  972|  12.9k|      *nextTokPtr = ptr;
  973|  12.9k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  12.9k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      9|    default:
  ------------------
  |  Branch (974:5): [True: 9, False: 90.6k]
  ------------------
  975|      9|      *nextTokPtr = ptr;
  976|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  977|  90.6k|    }
  978|  90.6k|  }
  979|     60|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     60|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  13.0k|}
xmltok.c:little2_contentTok:
  824|  36.3k|                   const char **nextTokPtr) {
  825|  36.3k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.16k, False: 35.1k]
  ------------------
  826|  1.16k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.16k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  35.1k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  35.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  35.1k|    size_t n = end - ptr;
  829|  35.1k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  35.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 10.0k, False: 25.1k]
  ------------------
  830|  10.0k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  10.0k|#  define MINBPC(enc) 2
  ------------------
  831|  10.0k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 71, False: 9.94k]
  ------------------
  832|     71|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  9.94k|      end = ptr + n;
  834|  9.94k|    }
  835|  35.1k|  }
  836|  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|  30.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 30.4k, False: 4.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  12.8k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 12.8k, False: 22.2k]
  ------------------
  838|  12.8k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  12.8k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  12.8k|#  define MINBPC(enc) 2
  ------------------
  839|  8.90k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 8.90k, False: 26.1k]
  ------------------
  840|  8.90k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  8.90k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  8.90k|#  define MINBPC(enc) 2
  ------------------
  841|  4.28k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 4.28k, False: 30.7k]
  ------------------
  842|  4.28k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.28k|#  define MINBPC(enc) 2
  ------------------
  843|  4.28k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.28k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.28k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 16, False: 4.27k]
  ------------------
  844|     16|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     16|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  4.27k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  4.27k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.27k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.76k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.76k, False: 2.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 195, False: 4.07k]
  ------------------
  846|    195|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    195|#  define MINBPC(enc) 2
  ------------------
  847|  4.27k|    *nextTokPtr = ptr;
  848|  4.27k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.27k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|    970|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 970, False: 34.1k]
  ------------------
  850|    970|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    970|#  define MINBPC(enc) 2
  ------------------
  851|    970|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    970|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  1.56k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 1.56k, False: 33.5k]
  ------------------
  853|  1.56k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.56k|#  define MINBPC(enc) 2
  ------------------
  854|  1.56k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.56k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.56k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.56k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 5, False: 1.56k]
  ------------------
  855|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  1.56k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  1.56k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.56k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.19k, False: 371]
  |  |  |  |  |  Branch (739:52): [True: 636, False: 554]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|    925|      break;
  858|    636|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    636|#  define MINBPC(enc) 2
  ------------------
  859|    636|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    636|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    636|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    636|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 6, False: 630]
  ------------------
  860|      6|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      6|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|    630|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    630|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    630|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 345, False: 285]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 343]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|    628|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|    628|#  define MINBPC(enc) 2
  ------------------
  863|    628|      break;
  864|    628|    }
  865|      2|    *nextTokPtr = ptr;
  866|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  867|  3.39k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 35.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: 35.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.69k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.64k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.69k, False: 33.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.69k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 57, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.64k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     57|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.64k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.64k|#    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.64k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.64k|    break;
  |  |  ------------------
  |  |   63|  1.64k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 31, False: 35.0k]
  |  |  ------------------
  |  |   64|     31|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 35.0k]
  |  |  ------------------
  |  |   65|     42|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 35.0k]
  |  |  ------------------
  |  |   66|     42|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     42|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     42|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  4.74k|  default:
  ------------------
  |  Branch (868:3): [True: 4.74k, False: 30.3k]
  ------------------
  869|  4.74k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.74k|#  define MINBPC(enc) 2
  ------------------
  870|  4.74k|    break;
  871|  35.0k|  }
  872|   629k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   629k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   629k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   629k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 21.1k, False: 608k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 629k]
  |  |  ------------------
  |  |  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: 629k]
  |  |  ------------------
  |  |  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|  4.98k|      LEAD_CASE(4)
  ------------------
  |  |  875|  4.93k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 4.98k, False: 625k]
  |  |  ------------------
  |  |  876|  4.98k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  4.93k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 53, False: 4.93k]
  |  |  ------------------
  |  |  877|     53|      *nextTokPtr = ptr;                                                       \
  |  |  878|     53|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     53|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     53|    }                                                                          \
  |  |  880|  4.93k|    ptr += n;                                                                  \
  |  |  881|  4.93k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  2.45k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 2.45k, False: 627k]
  ------------------
  887|  2.45k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  2.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  2.45k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.45k, False: 3]
  |  |  ------------------
  ------------------
  888|  2.45k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  2.45k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.45k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.56k, False: 888]
  |  |  |  |  |  Branch (739:52): [True: 735, False: 830]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  1.71k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.71k|#  define MINBPC(enc) 2
  ------------------
  890|  1.71k|          break;
  891|  1.71k|        }
  892|    735|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|    735|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|    735|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 730, False: 5]
  |  |  ------------------
  ------------------
  893|    730|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|    730|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    730|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 438, False: 292]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 437]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|    729|            ptr += MINBPC(enc);
  ------------------
  |  |  783|    729|#  define MINBPC(enc) 2
  ------------------
  895|    729|            break;
  896|    729|          }
  897|      1|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
  898|      1|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  899|    730|        }
  900|    735|      }
  901|       |      /* fall through */
  902|  1.81k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 1.80k, False: 628k]
  ------------------
  903|  3.46k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 1.65k, False: 628k]
  ------------------
  904|  3.48k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 26, False: 629k]
  ------------------
  905|  3.48k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 629k]
  ------------------
  906|  3.49k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 6, False: 629k]
  ------------------
  907|  6.90k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 3.41k, False: 626k]
  ------------------
  908|  7.52k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 616, False: 629k]
  ------------------
  909|  7.52k|      *nextTokPtr = ptr;
  910|  7.52k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.52k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   615k|    default:
  ------------------
  |  Branch (911:5): [True: 615k, False: 14.9k]
  ------------------
  912|   615k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   615k|#  define MINBPC(enc) 2
  ------------------
  913|   615k|      break;
  914|   629k|    }
  915|   629k|  }
  916|    358|  *nextTokPtr = ptr;
  917|    358|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    358|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  7.93k|}
xmltok.c:little2_scanLt:
  726|  12.8k|               const char **nextTokPtr) {
  727|  12.8k|#  ifdef XML_NS
  728|  12.8k|  int hadColon;
  729|  12.8k|#  endif
  730|  12.8k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.8k|    {                                                                          \
  |  |  |  |  135|  12.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  12.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  12.8k|    }
  |  |  ------------------
  ------------------
  731|  12.8k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  12.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  12.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.63k, False: 3.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  9.28k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  8.80k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.20k, False: 9.65k]
  |  |  ------------------
  |  |  111|  8.80k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  3.20k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  3.20k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.20k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 18, False: 3.18k]
  |  |  ------------------
  |  |  112|     18|      *nextTokPtr = ptr;                                                       \
  |  |  113|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     18|    }                                                                          \
  |  |  115|  8.80k|    /* fall through */                                                         \
  |  |  116|  8.80k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.85k, False: 10.0k]
  |  |  ------------------
  |  |  117|  8.80k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.76k, False: 10.0k]
  |  |  ------------------
  |  |  118|  8.80k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  8.80k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  8.80k|    break;                                                                     \
  |  |  120|  8.80k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |  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: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |  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: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |  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|    827|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 827, False: 12.0k]
  ------------------
  734|    827|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    827|#  define MINBPC(enc) 2
  ------------------
  735|    827|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    827|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    827|    {                                                                          \
  |  |  |  |  135|    827|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    827|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    827|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 826]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    827|    }
  |  |  ------------------
  ------------------
  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|    802|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 28, False: 798]
  |  |  |  |  |  Branch (737:4): [True: 802, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    201|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 201, False: 625]
  ------------------
  738|    201|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    201|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    201|#  define MINBPC(enc) 2
  ------------------
  739|    597|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 597, False: 229]
  ------------------
  740|    597|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    597|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    597|#  define MINBPC(enc) 2
  ------------------
  741|    826|    }
  742|     28|    *nextTokPtr = ptr;
  743|     28|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  744|  1.97k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 1.97k, False: 10.8k]
  ------------------
  745|  1.97k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.97k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.97k|#  define MINBPC(enc) 2
  ------------------
  746|  1.21k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.21k, False: 11.6k]
  ------------------
  747|  1.21k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.21k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.21k|#  define MINBPC(enc) 2
  ------------------
  748|      5|  default:
  ------------------
  |  Branch (748:3): [True: 5, False: 12.8k]
  ------------------
  749|      5|    *nextTokPtr = ptr;
  750|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  751|  12.8k|  }
  752|  8.80k|#  ifdef XML_NS
  753|  8.80k|  hadColon = 0;
  754|  8.80k|#  endif
  755|       |  /* we have a start-tag */
  756|  35.8k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  35.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  35.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  35.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.1k, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|   130k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  27.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 24.7k, False: 11.1k]
  |  |  ------------------
  |  |   82|  27.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  24.7k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  24.7k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  24.7k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 24.6k]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  27.1k|    /* fall through */                                                         \
  |  |   87|  27.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.18k, False: 34.7k]
  |  |  ------------------
  |  |   88|  26.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 434, False: 35.4k]
  |  |  ------------------
  |  |   89|  26.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 368, False: 35.5k]
  |  |  ------------------
  |  |   90|  26.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 225, False: 35.6k]
  |  |  ------------------
  |  |   91|  27.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 257, False: 35.6k]
  |  |  ------------------
  |  |   92|  27.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  27.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  27.1k|    break;                                                                     \
  |  |   94|  27.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 35.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 35.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 35.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     18|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 35.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);
  ------------------
  |  |  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.92k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.92k, False: 33.9k]
  ------------------
  777|  2.91k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 987, False: 34.8k]
  ------------------
  778|  3.87k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 956, False: 34.9k]
  ------------------
  779|  3.87k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.87k|#  define MINBPC(enc) 2
  ------------------
  780|  5.09k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.09k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.09k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.09k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.03k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.03k, False: 1.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.25k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.76k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.02k, False: 4.06k]
  |  |  ------------------
  |  |  111|  2.76k|    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: 14, False: 1.01k]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  2.76k|    /* fall through */                                                         \
  |  |  116|  2.76k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.17k, False: 3.91k]
  |  |  ------------------
  |  |  117|  2.76k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 571, False: 4.52k]
  |  |  ------------------
  |  |  118|  2.76k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.76k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.76k|    break;                                                                     \
  |  |  120|  2.76k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.09k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.09k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 5.07k]
  |  |  |  |  ------------------
  |  |  |  |  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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      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;
  |  |  ------------------
  ------------------
  783|    817|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 817, False: 4.27k]
  ------------------
  784|    817|          goto gt;
  785|    213|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 213, False: 4.87k]
  ------------------
  786|    213|          goto sol;
  787|    474|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 474, False: 4.61k]
  ------------------
  788|    780|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 306, False: 4.78k]
  ------------------
  789|  1.26k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 480, False: 4.61k]
  ------------------
  790|  1.26k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.26k|#  define MINBPC(enc) 2
  ------------------
  791|  1.26k|          continue;
  792|      5|        default:
  ------------------
  |  Branch (792:9): [True: 5, False: 5.08k]
  ------------------
  793|      5|          *nextTokPtr = ptr;
  794|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  795|  5.09k|        }
  796|  2.76k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.76k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  5.09k|      }
  798|     41|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  3.87k|    }
  800|  4.55k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 4.55k, False: 31.3k]
  ------------------
  801|  5.37k|    gt:
  802|  5.37k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.37k|#  define MINBPC(enc) 2
  ------------------
  803|  5.37k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  5.37k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    258|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 258, False: 35.6k]
  ------------------
  805|    471|    sol:
  806|    471|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    471|#  define MINBPC(enc) 2
  ------------------
  807|    471|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    471|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    471|    {                                                                          \
  |  |  |  |  135|    471|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    471|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    471|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 459]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|    471|    }
  |  |  ------------------
  ------------------
  808|    459|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    459|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    459|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 454, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 437, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     22|        *nextTokPtr = ptr;
  810|     22|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  811|     22|      }
  812|    437|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    437|#  define MINBPC(enc) 2
  ------------------
  813|    437|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    437|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     10|    default:
  ------------------
  |  Branch (814:5): [True: 10, False: 35.8k]
  ------------------
  815|     10|      *nextTokPtr = ptr;
  816|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  817|  35.8k|    }
  818|  35.8k|  }
  819|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  8.80k|}
xmltok.c:little2_scanCdataSection:
  337|    597|                         const char **nextTokPtr) {
  338|    597|  static const char CDATA_LSQB[]
  339|    597|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    597|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    597|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    597|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    597|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    597|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    597|#define ASCII_LSQB 0x5B
  ------------------
  340|    597|  int i;
  341|    597|  UNUSED_P(enc);
  ------------------
  |  |  135|    597|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    597|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    597|    {                                                                          \
  |  |  135|    597|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    597|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    597|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 5, False: 592]
  |  |  ------------------
  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      5|      }                                                                        \
  |  |  138|    597|    }
  ------------------
  344|  4.09k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.50k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.52k, False: 579]
  ------------------
  345|  3.52k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  3.52k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.52k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.51k, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 3.50k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     13|      *nextTokPtr = ptr;
  347|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  348|     13|    }
  349|  3.52k|  }
  350|    579|  *nextTokPtr = ptr;
  351|    579|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    579|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    592|}
xmltok.c:little2_scanEndTag:
  432|  1.21k|                   const char **nextTokPtr) {
  433|  1.21k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.21k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.21k|    {                                                                          \
  |  |  |  |  135|  1.21k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.21k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.21k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.21k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.21k|    }
  |  |  ------------------
  ------------------
  434|  1.21k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.21k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.21k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    783|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 783, False: 428]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.35k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.18k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 408, False: 803]
  |  |  ------------------
  |  |  111|  1.18k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    408|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    408|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    408|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 406]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  1.18k|    /* fall through */                                                         \
  |  |  116|  1.18k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 513, False: 698]
  |  |  ------------------
  |  |  117|  1.18k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 269, False: 942]
  |  |  ------------------
  |  |  118|  1.18k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.18k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.18k|    break;                                                                     \
  |  |  120|  1.18k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.21k]
  |  |  |  |  ------------------
  |  |  |  |  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.21k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 1.19k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|     11|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      6|  default:
  ------------------
  |  Branch (436:3): [True: 6, False: 1.20k]
  ------------------
  437|      6|    *nextTokPtr = ptr;
  438|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  439|  1.21k|  }
  440|  2.54k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.54k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.54k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.54k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.17k, False: 368]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.01k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.41k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 343, False: 2.19k]
  |  |  ------------------
  |  |   82|  1.41k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    343|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    343|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    343|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 330]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  1.41k|    /* fall through */                                                         \
  |  |   87|  1.41k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 223, False: 2.31k]
  |  |  ------------------
  |  |   88|    828|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 275, False: 2.26k]
  |  |  ------------------
  |  |   89|  1.02k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 201, False: 2.33k]
  |  |  ------------------
  |  |   90|  1.22k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 2.34k]
  |  |  ------------------
  |  |   91|  1.41k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 196, False: 2.34k]
  |  |  ------------------
  |  |   92|  1.41k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.41k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.41k|    break;                                                                     \
  |  |   94|  1.41k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.54k]
  |  |  |  |  ------------------
  |  |  |  |   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.54k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  443|    338|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 338, False: 2.20k]
  ------------------
  444|    548|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 210, False: 2.33k]
  ------------------
  445|    816|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 268, False: 2.27k]
  ------------------
  446|  1.64k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    816|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    871|#  define MINBPC(enc) 2
  ------------------
  447|  1.64k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.64k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.64k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.62k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.62k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    202|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 202, False: 1.44k]
  ------------------
  449|    441|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 239, False: 1.40k]
  ------------------
  450|    871|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 430, False: 1.21k]
  ------------------
  451|    871|          break;
  452|    751|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 751, False: 894]
  ------------------
  453|    751|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    751|#  define MINBPC(enc) 2
  ------------------
  454|    751|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    751|#define XML_TOK_END_TAG 5
  ------------------
  455|     23|        default:
  ------------------
  |  Branch (455:9): [True: 23, False: 1.62k]
  ------------------
  456|     23|          *nextTokPtr = ptr;
  457|     23|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  458|  1.64k|        }
  459|  1.64k|      }
  460|     42|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 2.54k]
  ------------------
  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|    264|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 264, False: 2.27k]
  ------------------
  469|    264|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    264|#  define MINBPC(enc) 2
  ------------------
  470|    264|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    264|#define XML_TOK_END_TAG 5
  ------------------
  471|      9|    default:
  ------------------
  |  Branch (471:5): [True: 9, False: 2.53k]
  ------------------
  472|      9|      *nextTokPtr = ptr;
  473|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  474|  2.54k|    }
  475|  2.54k|  }
  476|     67|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.18k|}
xmltok.c:little2_scanAtts:
  573|  2.76k|                 const char **nextTokPtr) {
  574|  2.76k|#  ifdef XML_NS
  575|  2.76k|  int hadColon = 0;
  576|  2.76k|#  endif
  577|   217k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   217k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   217k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   217k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   215k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 215k, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  10.9k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.98k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.07k, False: 215k]
  |  |  ------------------
  |  |   82|  2.98k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.07k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.07k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.07k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 1.05k]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  2.98k|    /* fall through */                                                         \
  |  |   87|  2.98k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.03k, False: 216k]
  |  |  ------------------
  |  |   88|  2.39k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 302, False: 216k]
  |  |  ------------------
  |  |   89|  2.58k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 194, False: 216k]
  |  |  ------------------
  |  |   90|  2.78k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 216k]
  |  |  ------------------
  |  |   91|  2.98k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 216k]
  |  |  ------------------
  |  |   92|  2.98k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.98k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.98k|    break;                                                                     \
  |  |   94|  2.98k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 217k]
  |  |  |  |  ------------------
  |  |  |  |   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: 217k]
  |  |  |  |  ------------------
  |  |  |  |   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: 217k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 6]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     12|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|      6|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 217k]
  ------------------
  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|    294|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 294, False: 216k]
  ------------------
  598|    549|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 255, False: 216k]
  ------------------
  599|    766|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 217, False: 216k]
  ------------------
  600|  1.35k|      for (;;) {
  601|  1.35k|        int t;
  602|       |
  603|  1.35k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.35k|#  define MINBPC(enc) 2
  ------------------
  604|  1.35k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.35k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.35k|    {                                                                          \
  |  |  |  |  135|  1.35k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.35k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.35k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|  1.35k|    }
  |  |  ------------------
  ------------------
  605|  1.30k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  1.30k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.30k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.29k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.29k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.30k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 711, False: 596]
  ------------------
  607|    711|          break;
  608|    596|        switch (t) {
  609|    196|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 196, False: 400]
  ------------------
  610|    390|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 194, False: 402]
  ------------------
  611|    584|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 194, False: 402]
  ------------------
  612|    584|          break;
  613|     12|        default:
  ------------------
  |  Branch (613:9): [True: 12, False: 584]
  ------------------
  614|     12|          *nextTokPtr = ptr;
  615|     12|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  616|    596|        }
  617|    596|      }
  618|       |      /* fall through */
  619|   213k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 213k, False: 3.78k]
  ------------------
  620|   213k|      int open;
  621|   213k|#  ifdef XML_NS
  622|   213k|      hadColon = 0;
  623|   213k|#  endif
  624|   214k|      for (;;) {
  625|   214k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   214k|#  define MINBPC(enc) 2
  ------------------
  626|   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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   214k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 214k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|   214k|    }
  |  |  ------------------
  ------------------
  627|   214k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   214k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   214k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   214k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 214k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   214k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 9.93k, False: 204k]
  |  Branch (628:32): [True: 203k, False: 998]
  ------------------
  629|   213k|          break;
  630|    998|        switch (open) {
  631|    427|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 427, False: 571]
  ------------------
  632|    725|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 298, False: 700]
  ------------------
  633|    969|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 244, False: 754]
  ------------------
  634|    969|          break;
  635|     29|        default:
  ------------------
  |  Branch (635:9): [True: 29, False: 969]
  ------------------
  636|     29|          *nextTokPtr = ptr;
  637|     29|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  638|    998|        }
  639|    998|      }
  640|   213k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   213k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  6.62M|      for (;;) {
  643|  6.62M|        int t;
  644|  6.62M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.62M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.62M|    {                                                                          \
  |  |  |  |  135|  6.62M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.62M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.62M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 60, False: 6.62M]
  |  |  |  |  ------------------
  |  |  |  |  136|     60|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     60|      }                                                                        \
  |  |  |  |  138|  6.62M|    }
  |  |  ------------------
  ------------------
  645|  6.62M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  6.62M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.62M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.14M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.14M, False: 5.47M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  6.62M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 213k, False: 6.40M]
  ------------------
  647|   213k|          break;
  648|  6.40M|        switch (t) {
  649|   172k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 6.40M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 6.40M]
  |  |  |  |  ------------------
  |  |  |  |   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|  86.4k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  86.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 86.4k, False: 6.32M]
  |  |  |  |  ------------------
  |  |  |  |   50|  86.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 86.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  86.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  86.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  86.4k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  86.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  86.4k|    break;
  |  |  ------------------
  |  |   63|  86.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 10, False: 6.40M]
  |  |  ------------------
  |  |   64|     10|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 6.40M]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 6.40M]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  96.9k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 96.9k, False: 6.31M]
  ------------------
  651|  96.9k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  96.9k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  96.9k|#  define MINBPC(enc) 2
  ------------------
  652|  96.9k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 7, False: 96.9k]
  ------------------
  653|      7|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 3, False: 4]
  ------------------
  654|      3|              *nextTokPtr = ptr;
  655|      7|            return tok;
  656|      7|          }
  657|  96.9k|          break;
  658|  96.9k|        }
  659|  96.9k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 2, False: 6.40M]
  ------------------
  660|      2|          *nextTokPtr = ptr;
  661|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  662|  6.22M|        default:
  ------------------
  |  Branch (662:9): [True: 6.22M, False: 183k]
  ------------------
  663|  6.22M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.22M|#  define MINBPC(enc) 2
  ------------------
  664|  6.22M|          break;
  665|  6.40M|        }
  666|  6.40M|      }
  667|   213k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   213k|#  define MINBPC(enc) 2
  ------------------
  668|   213k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   213k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   213k|    {                                                                          \
  |  |  |  |  135|   213k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   213k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   213k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 213k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|   213k|    }
  |  |  ------------------
  ------------------
  669|   213k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   213k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   213k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   213k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 213k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   201k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 201k, False: 12.1k]
  ------------------
  671|   204k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.84k, False: 210k]
  ------------------
  672|   212k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 7.56k, False: 206k]
  ------------------
  673|   212k|        break;
  674|    247|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 247, False: 213k]
  ------------------
  675|    247|        goto sol;
  676|  1.43k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.43k, False: 212k]
  ------------------
  677|  1.43k|        goto gt;
  678|     28|      default:
  ------------------
  |  Branch (678:7): [True: 28, False: 213k]
  ------------------
  679|     28|        *nextTokPtr = ptr;
  680|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  681|   213k|      }
  682|       |      /* ptr points to closing quote */
  683|   213k|      for (;;) {
  684|   213k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   213k|#  define MINBPC(enc) 2
  ------------------
  685|   213k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   213k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   213k|    {                                                                          \
  |  |  |  |  135|   213k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   213k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   213k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 213k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|   213k|    }
  |  |  ------------------
  ------------------
  686|   213k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   213k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   213k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   209k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 209k, False: 4.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   170k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   211k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 4.17k, False: 209k]
  |  |  ------------------
  |  |  111|   211k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  4.17k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  4.17k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.17k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 6, False: 4.16k]
  |  |  ------------------
  |  |  112|      6|      *nextTokPtr = ptr;                                                       \
  |  |  113|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      6|    }                                                                          \
  |  |  115|   211k|    /* fall through */                                                         \
  |  |  116|   211k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 162k, False: 51.1k]
  |  |  ------------------
  |  |  117|   211k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 44.7k, False: 168k]
  |  |  ------------------
  |  |  118|   211k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   211k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   211k|    break;                                                                     \
  |  |  120|   211k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 213k]
  |  |  |  |  ------------------
  |  |  |  |  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: 213k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 213k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    867|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 867, False: 212k]
  ------------------
  689|  1.15k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 289, False: 213k]
  ------------------
  690|  1.61k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 461, False: 213k]
  ------------------
  691|  1.61k|          continue;
  692|    335|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 335, False: 213k]
  ------------------
  693|  1.77k|        gt:
  694|  1.77k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.77k|#  define MINBPC(enc) 2
  ------------------
  695|  1.77k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.77k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    267|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 267, False: 213k]
  ------------------
  697|    514|        sol:
  698|    514|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    514|#  define MINBPC(enc) 2
  ------------------
  699|    514|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    514|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    514|    {                                                                          \
  |  |  |  |  135|    514|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    514|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    514|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 504]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|    514|    }
  |  |  ------------------
  ------------------
  700|    504|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    504|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    504|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 499, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 490, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     14|            *nextTokPtr = ptr;
  702|     14|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  703|     14|          }
  704|    490|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    490|#  define MINBPC(enc) 2
  ------------------
  705|    490|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    490|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      9|        default:
  ------------------
  |  Branch (706:9): [True: 9, False: 213k]
  ------------------
  707|      9|          *nextTokPtr = ptr;
  708|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  709|   213k|        }
  710|   211k|        break;
  711|   213k|      }
  712|   211k|      break;
  713|   212k|    }
  714|   211k|    default:
  ------------------
  |  Branch (714:5): [True: 8, False: 217k]
  ------------------
  715|      8|      *nextTokPtr = ptr;
  716|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  717|   217k|    }
  718|   217k|  }
  719|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.76k|}
xmltok.c:little2_scanRef:
  545|   203k|                const char **nextTokPtr) {
  546|   203k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   203k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   203k|    {                                                                          \
  |  |  |  |  135|   203k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   203k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   203k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 31, False: 203k]
  |  |  |  |  ------------------
  |  |  |  |  136|     31|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     31|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     31|      }                                                                        \
  |  |  |  |  138|   203k|    }
  |  |  ------------------
  ------------------
  547|   203k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   203k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   203k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   201k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 201k, False: 1.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  7.51k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   199k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.43k, False: 201k]
  |  |  ------------------
  |  |  111|   199k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.43k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.43k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.43k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 1.42k]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|   199k|    /* fall through */                                                         \
  |  |  116|   199k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.64k, False: 198k]
  |  |  ------------------
  |  |  117|   199k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 193k, False: 10.0k]
  |  |  ------------------
  |  |  118|   199k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   199k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   199k|    break;                                                                     \
  |  |  120|   199k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 203k]
  |  |  |  |  ------------------
  |  |  |  |  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: 203k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     12|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 203k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|      7|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  3.94k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 3.94k, False: 199k]
  ------------------
  550|  3.94k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.94k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.94k|#  define MINBPC(enc) 2
  ------------------
  551|      8|  default:
  ------------------
  |  Branch (551:3): [True: 8, False: 203k]
  ------------------
  552|      8|    *nextTokPtr = ptr;
  553|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  554|   203k|  }
  555|   216k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   216k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   216k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   216k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   212k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 212k, False: 4.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  69.2k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  17.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 3.99k, False: 212k]
  |  |  ------------------
  |  |   82|  17.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  3.99k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.99k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.99k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 3.98k]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  17.1k|    /* fall through */                                                         \
  |  |   87|  17.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 11.3k, False: 204k]
  |  |  ------------------
  |  |   88|  16.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.02k, False: 215k]
  |  |  ------------------
  |  |   89|  16.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 286, False: 215k]
  |  |  ------------------
  |  |   90|  16.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 210, False: 215k]
  |  |  ------------------
  |  |   91|  17.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 291, False: 215k]
  |  |  ------------------
  |  |   92|  17.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  17.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  17.1k|    break;                                                                     \
  |  |   94|  17.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 216k]
  |  |  |  |  ------------------
  |  |  |  |   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: 216k]
  |  |  |  |  ------------------
  |  |  |  |   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: 216k]
  |  |  |  |  ------------------
  |  |  |  |   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|   198k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 198k, False: 17.1k]
  ------------------
  559|   198k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   198k|#  define MINBPC(enc) 2
  ------------------
  560|   198k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   198k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      5|    default:
  ------------------
  |  Branch (561:5): [True: 5, False: 216k]
  ------------------
  562|      5|      *nextTokPtr = ptr;
  563|      5|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  564|   216k|    }
  565|   216k|  }
  566|     59|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     59|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   199k|}
xmltok.c:little2_scanCharRef:
  514|  3.94k|                    const char **nextTokPtr) {
  515|  3.94k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  3.94k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.94k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.94k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 3.94k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  3.94k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  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.93k, False: 2]
  |  |  |  |  |  Branch (739:52): [True: 2.69k, False: 1.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  2.69k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.69k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.69k|#  define MINBPC(enc) 2
  ------------------
  518|  1.24k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.24k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.24k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.23k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.23k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.23k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.23k, False: 4]
  ------------------
  520|  1.23k|      break;
  521|      4|    default:
  ------------------
  |  Branch (521:5): [True: 4, False: 1.23k]
  ------------------
  522|      4|      *nextTokPtr = ptr;
  523|      4|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  524|  1.24k|    }
  525|  3.20k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.23k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.97k|#  define MINBPC(enc) 2
  ------------------
  526|  3.20k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.20k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.20k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.17k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.97k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.97k, False: 1.22k]
  ------------------
  528|  1.97k|        break;
  529|  1.20k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.20k, False: 1.99k]
  ------------------
  530|  1.20k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.20k|#  define MINBPC(enc) 2
  ------------------
  531|  1.20k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.20k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     23|      default:
  ------------------
  |  Branch (532:7): [True: 23, False: 3.17k]
  ------------------
  533|     23|        *nextTokPtr = ptr;
  534|     23|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  535|  3.20k|      }
  536|  3.20k|    }
  537|  1.23k|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  3.94k|}
xmltok.c:little2_scanHexCharRef:
  483|  2.69k|                       const char **nextTokPtr) {
  484|  2.69k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  2.69k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  2.69k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 2.69k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  2.69k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.69k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.69k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.69k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|    902|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 902, False: 1.79k]
  ------------------
  487|  2.68k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 1.78k, False: 911]
  ------------------
  488|  2.68k|      break;
  489|      9|    default:
  ------------------
  |  Branch (489:5): [True: 9, False: 2.68k]
  ------------------
  490|      9|      *nextTokPtr = ptr;
  491|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  492|  2.69k|    }
  493|  9.02k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  2.68k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  6.34k|#  define MINBPC(enc) 2
  ------------------
  494|  9.02k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.02k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.02k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.99k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.99k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  2.59k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 2.59k, False: 6.42k]
  ------------------
  496|  6.34k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 3.75k, False: 5.27k]
  ------------------
  497|  6.34k|        break;
  498|  2.64k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 2.64k, False: 6.38k]
  ------------------
  499|  2.64k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.64k|#  define MINBPC(enc) 2
  ------------------
  500|  2.64k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  2.64k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     33|      default:
  ------------------
  |  Branch (501:7): [True: 33, False: 8.99k]
  ------------------
  502|     33|        *nextTokPtr = ptr;
  503|     33|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  504|  9.02k|      }
  505|  9.02k|    }
  506|  2.68k|  }
  507|     14|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  2.69k|}
xmltok.c:little2_cdataSectionTok:
  356|  24.8k|                        const char **nextTokPtr) {
  357|  24.8k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 144, False: 24.6k]
  ------------------
  358|    144|    return XML_TOK_NONE;
  ------------------
  |  |   51|    144|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  24.6k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  24.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  24.6k|    size_t n = end - ptr;
  361|  24.6k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  24.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 12.1k, False: 12.5k]
  ------------------
  362|  12.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  12.1k|#  define MINBPC(enc) 2
  ------------------
  363|  12.1k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 13, False: 12.1k]
  ------------------
  364|     13|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  12.1k|      end = ptr + n;
  366|  12.1k|    }
  367|  24.6k|  }
  368|  24.6k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  24.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  24.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 18.7k, False: 5.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  9.03k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 9.03k, False: 15.6k]
  ------------------
  370|  9.03k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.03k|#  define MINBPC(enc) 2
  ------------------
  371|  9.03k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.03k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.03k|    {                                                                          \
  |  |  |  |  135|  9.03k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.03k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  9.03k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 9.03k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  9.03k|    }
  |  |  ------------------
  ------------------
  372|  9.03k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  9.03k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  9.03k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.73k, False: 2.29k]
  |  |  |  |  |  Branch (739:52): [True: 4.32k, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  4.70k|      break;
  374|  4.32k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.32k|#  define MINBPC(enc) 2
  ------------------
  375|  4.32k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.32k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.32k|    {                                                                          \
  |  |  |  |  135|  4.32k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.32k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 4.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  4.32k|    }
  |  |  ------------------
  ------------------
  376|  4.32k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  4.32k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.32k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.61k, False: 1.70k]
  |  |  |  |  |  Branch (739:52): [True: 268, False: 2.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  4.05k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  4.05k|#  define MINBPC(enc) 2
  ------------------
  378|  4.05k|      break;
  379|  4.05k|    }
  380|    268|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    268|#  define MINBPC(enc) 2
  ------------------
  381|    268|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    268|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  7.83k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 7.83k, False: 16.8k]
  ------------------
  383|  7.83k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.83k|#  define MINBPC(enc) 2
  ------------------
  384|  7.83k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.83k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.83k|    {                                                                          \
  |  |  |  |  135|  7.83k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.83k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.83k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 7.82k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  7.83k|    }
  |  |  ------------------
  ------------------
  385|  7.82k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  7.82k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.82k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.22k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.22k, False: 5.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 346, False: 7.47k]
  ------------------
  386|    346|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    346|#  define MINBPC(enc) 2
  ------------------
  387|  7.82k|    *nextTokPtr = ptr;
  388|  7.82k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.82k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  1.14k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 1.14k, False: 23.5k]
  ------------------
  390|  1.14k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.14k|#  define MINBPC(enc) 2
  ------------------
  391|  1.14k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.14k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  6.85k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 24.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 24.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  3.40k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.34k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.40k, False: 21.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.40k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 68, False: 3.34k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.34k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     68|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.34k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  3.34k|#    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.34k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.34k|    break;
  |  |  ------------------
  |  |   63|  3.34k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 51, False: 24.6k]
  |  |  ------------------
  |  |   64|     51|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 24.6k]
  |  |  ------------------
  |  |   65|     63|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 12, False: 24.6k]
  |  |  ------------------
  |  |   66|     63|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     63|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     63|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  3.18k|  default:
  ------------------
  |  Branch (393:3): [True: 3.18k, False: 21.4k]
  ------------------
  394|  3.18k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.18k|#  define MINBPC(enc) 2
  ------------------
  395|  3.18k|    break;
  396|  24.6k|  }
  397|   936k|  while (HAS_CHAR(enc, ptr, end)) {
  398|   936k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   936k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   936k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  37.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 37.5k, False: 898k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 936k]
  |  |  ------------------
  |  |  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: 936k]
  |  |  ------------------
  |  |  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|  11.1k|      LEAD_CASE(4)
  ------------------
  |  |  400|  11.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 11.1k, False: 924k]
  |  |  ------------------
  |  |  401|  11.1k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  11.0k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 62, False: 11.0k]
  |  |  ------------------
  |  |  402|     62|      *nextTokPtr = ptr;                                                       \
  |  |  403|     62|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     62|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     62|    }                                                                          \
  |  |  405|  11.0k|    ptr += n;                                                                  \
  |  |  406|  11.0k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     49|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 49, False: 936k]
  ------------------
  412|     49|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 936k]
  ------------------
  413|     57|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 8, False: 936k]
  ------------------
  414|  6.83k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 6.77k, False: 929k]
  ------------------
  415|  7.70k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 875, False: 935k]
  ------------------
  416|  15.0k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 7.39k, False: 928k]
  ------------------
  417|  15.0k|      *nextTokPtr = ptr;
  418|  15.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  15.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   909k|    default:
  ------------------
  |  Branch (419:5): [True: 909k, False: 26.2k]
  ------------------
  420|   909k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   909k|#  define MINBPC(enc) 2
  ------------------
  421|   909k|      break;
  422|   936k|    }
  423|   936k|  }
  424|    123|  *nextTokPtr = ptr;
  425|    123|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    123|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  15.2k|}
xmltok.c:little2_attributeValueTok:
 1262|   259k|                          const char **nextTokPtr) {
 1263|   259k|  const char *start;
 1264|   259k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 10.6k, False: 248k]
  ------------------
 1265|  10.6k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  10.6k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   248k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   248k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   248k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   248k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 248k]
  ------------------
 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|   248k|  start = ptr;
 1275|  4.75M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  4.75M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.75M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.75M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   368k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 368k, False: 4.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 4.75M]
  |  |  ------------------
  |  | 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: 4.75M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|   151k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   151k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 151k, False: 4.60M]
  |  |  ------------------
  |  | 1279|   151k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   151k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   183k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 183k, False: 4.57M]
  ------------------
 1286|   183k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 95.5k, False: 88.2k]
  ------------------
 1287|  95.5k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  95.5k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  95.5k|#  define MINBPC(enc) 2
  ------------------
 1288|  88.2k|      *nextTokPtr = ptr;
 1289|  88.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  88.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 4.75M]
  ------------------
 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|  33.7k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 33.7k, False: 4.72M]
  ------------------
 1295|  33.7k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 18.6k, False: 15.0k]
  ------------------
 1296|  18.6k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  18.6k|#  define MINBPC(enc) 2
  ------------------
 1297|  18.6k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  18.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  18.6k|      }
 1299|  15.0k|      *nextTokPtr = ptr;
 1300|  15.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  15.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  16.4k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 16.4k, False: 4.73M]
  ------------------
 1302|  16.4k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 10.8k, False: 5.61k]
  ------------------
 1303|  10.8k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.8k|#  define MINBPC(enc) 2
  ------------------
 1304|  10.8k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  10.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  10.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 239, False: 10.5k]
  ------------------
 1305|    239|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    239|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  10.5k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  10.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.60k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.60k, False: 3.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 3.61k, False: 6.94k]
  ------------------
 1307|  3.61k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.61k|#  define MINBPC(enc) 2
  ------------------
 1308|  10.5k|        *nextTokPtr = ptr;
 1309|  10.5k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.5k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  10.8k|      }
 1311|  5.61k|      *nextTokPtr = ptr;
 1312|  5.61k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.61k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  7.51k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 7.51k, False: 4.74M]
  ------------------
 1314|  7.51k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 4.81k, False: 2.70k]
  ------------------
 1315|  4.81k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.81k|#  define MINBPC(enc) 2
  ------------------
 1316|  4.81k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  4.81k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  4.81k|      }
 1318|  2.70k|      *nextTokPtr = ptr;
 1319|  2.70k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.70k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  4.36M|    default:
  ------------------
  |  Branch (1320:5): [True: 4.36M, False: 392k]
  ------------------
 1321|  4.36M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.36M|#  define MINBPC(enc) 2
  ------------------
 1322|  4.36M|      break;
 1323|  4.75M|    }
 1324|  4.75M|  }
 1325|  7.08k|  *nextTokPtr = ptr;
 1326|  7.08k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.08k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   248k|}
xmltok.c:little2_entityValueTok:
 1331|  43.6k|                       const char **nextTokPtr) {
 1332|  43.6k|  const char *start;
 1333|  43.6k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.31k, False: 41.3k]
  ------------------
 1334|  2.31k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.31k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  41.3k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  41.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  41.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  41.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 41.3k]
  ------------------
 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|  41.3k|  start = ptr;
 1344|  31.2M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  31.2M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  31.2M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  31.2M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   138k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 138k, False: 31.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 31.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: 31.2M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  31.7k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  31.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 31.7k, False: 31.1M]
  |  |  ------------------
  |  | 1348|  31.7k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  31.7k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  2.75k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 2.75k, False: 31.2M]
  ------------------
 1355|  2.75k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 1.67k, False: 1.08k]
  ------------------
 1356|  1.67k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.67k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.67k|#  define MINBPC(enc) 2
  ------------------
 1357|  1.08k|      *nextTokPtr = ptr;
 1358|  1.08k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.08k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      7|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 7, False: 31.2M]
  ------------------
 1360|      7|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 2]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|      5|#  define PREFIX(ident) little2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|      5|#  define MINBPC(enc) 2
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 4]
  ------------------
 1363|      5|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  5.81k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 5.81k, False: 31.2M]
  ------------------
 1367|  5.81k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 3.17k, False: 2.64k]
  ------------------
 1368|  3.17k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.17k|#  define MINBPC(enc) 2
  ------------------
 1369|  3.17k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.17k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  3.17k|      }
 1371|  2.64k|      *nextTokPtr = ptr;
 1372|  2.64k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.64k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  31.4k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 31.4k, False: 31.1M]
  ------------------
 1374|  31.4k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 17.0k, False: 14.4k]
  ------------------
 1375|  17.0k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  17.0k|#  define MINBPC(enc) 2
  ------------------
 1376|  17.0k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  17.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  17.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  17.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 382, False: 16.6k]
  ------------------
 1377|    382|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    382|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  16.6k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  16.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  16.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.78k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.78k, False: 9.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 569, False: 16.0k]
  ------------------
 1379|    569|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    569|#  define MINBPC(enc) 2
  ------------------
 1380|  16.6k|        *nextTokPtr = ptr;
 1381|  16.6k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  16.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  17.0k|      }
 1383|  14.4k|      *nextTokPtr = ptr;
 1384|  14.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  14.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  31.1M|    default:
  ------------------
  |  Branch (1385:5): [True: 31.1M, False: 71.8k]
  ------------------
 1386|  31.1M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  31.1M|#  define MINBPC(enc) 2
  ------------------
 1387|  31.1M|      break;
 1388|  31.2M|    }
 1389|  31.2M|  }
 1390|  1.24k|  *nextTokPtr = ptr;
 1391|  1.24k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.24k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  41.3k|}
xmltok.c:little2_nameMatchesAscii:
 1715|   102k|                         const char *end1, const char *ptr2) {
 1716|   102k|  UNUSED_P(enc);
  ------------------
  |  |  135|   102k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   420k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|   318k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 355k, False: 65.6k]
  ------------------
 1718|   355k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|   355k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 46, False: 355k]
  ------------------
 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|     46|      return 0; /* LCOV_EXCL_LINE */
 1725|     46|    }
 1726|   355k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|   355k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|   355k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 355k, False: 24]
  |  |  |  |  |  Branch (739:52): [True: 318k, False: 36.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  36.5k|      return 0;
 1728|   355k|  }
 1729|  65.6k|  return ptr1 == end1;
 1730|   102k|}
xmltok.c:little2_nameLength:
 1733|  11.9k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  11.9k|  const char *start = ptr;
 1735|  50.1k|  for (;;) {
 1736|  50.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  50.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  50.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 21.4k, False: 28.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 50.1k]
  |  |  ------------------
  |  | 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: 50.1k]
  |  |  ------------------
  |  | 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: 50.1k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  28.7k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 28.7k, False: 21.4k]
  ------------------
 1746|  34.1k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 5.43k, False: 44.7k]
  ------------------
 1747|  34.1k|#  ifdef XML_NS
 1748|  34.1k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 50.1k]
  ------------------
 1749|  34.1k|#  endif
 1750|  37.9k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.77k, False: 46.4k]
  ------------------
 1751|  38.1k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 174, False: 50.0k]
  ------------------
 1752|  38.1k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 31, False: 50.1k]
  ------------------
 1753|  38.2k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 63, False: 50.1k]
  ------------------
 1754|  38.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  38.2k|#  define MINBPC(enc) 2
  ------------------
 1755|  38.2k|      break;
 1756|  11.9k|    default:
  ------------------
  |  Branch (1756:5): [True: 11.9k, False: 38.2k]
  ------------------
 1757|  11.9k|      return (int)(ptr - start);
 1758|  50.1k|    }
 1759|  50.1k|  }
 1760|  11.9k|}
xmltok.c:little2_getAtts:
 1510|  8.18k|                ATTRIBUTE *atts) {
 1511|  8.18k|  enum { other, inName, inValue } state = inName;
 1512|  8.18k|  int nAtts = 0;
 1513|  8.18k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  10.1M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.18k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  10.1M|#  define MINBPC(enc) 2
  ------------------
 1517|  10.1M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  10.1M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.1M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.95M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.95M, False: 6.17M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 10.1M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  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: 10.1M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1532|  99.5k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  99.5k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 99.5k, False: 10.0M]
  |  |  ------------------
  |  | 1528|  99.5k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  99.5k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 99.5k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|  99.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  99.5k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  6.07M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 6.07M, False: 4.05M]
  ------------------
 1535|  6.51M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 434k, False: 9.69M]
  ------------------
 1536|  6.72M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 210k, False: 9.91M]
  ------------------
 1537|  6.72M|      START_NAME
  ------------------
  |  | 1519|  6.72M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 421k, False: 6.30M]
  |  |  ------------------
  |  | 1520|   421k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 213k, False: 207k]
  |  |  ------------------
  |  | 1521|   213k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   213k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   213k|      }                                                                        \
  |  | 1524|   421k|      state = inName;                                                          \
  |  | 1525|   421k|    }
  ------------------
 1538|  6.72M|      break;
 1539|      0|#  undef START_NAME
 1540|  33.3k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 33.3k, False: 10.0M]
  ------------------
 1541|  33.3k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 16.2k, False: 17.1k]
  ------------------
 1542|  16.2k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 9.52k, False: 6.69k]
  ------------------
 1543|  9.52k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  9.52k|#  define MINBPC(enc) 2
  ------------------
 1544|  16.2k|        state = inValue;
 1545|  16.2k|        open = BT_QUOT;
 1546|  17.1k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 16.2k, False: 907]
  ------------------
 1547|  16.2k|        state = other;
 1548|  16.2k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 9.52k, False: 6.69k]
  ------------------
 1549|  9.52k|          atts[nAtts].valueEnd = ptr;
 1550|  16.2k|        nAtts++;
 1551|  16.2k|      }
 1552|  33.3k|      break;
 1553|   810k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 810k, False: 9.31M]
  ------------------
 1554|   810k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 404k, False: 405k]
  ------------------
 1555|   404k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 204k, False: 200k]
  ------------------
 1556|   204k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   204k|#  define MINBPC(enc) 2
  ------------------
 1557|   404k|        state = inValue;
 1558|   404k|        open = BT_APOS;
 1559|   405k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 404k, False: 941]
  ------------------
 1560|   404k|        state = other;
 1561|   404k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 204k, False: 200k]
  ------------------
 1562|   204k|          atts[nAtts].valueEnd = ptr;
 1563|   404k|        nAtts++;
 1564|   404k|      }
 1565|   810k|      break;
 1566|  97.0k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 97.0k, False: 10.0M]
  ------------------
 1567|  97.0k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 96.6k, False: 470]
  ------------------
 1568|  96.6k|        atts[nAtts].normalized = 0;
 1569|  97.0k|      break;
 1570|  1.12M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.12M, False: 9.01M]
  ------------------
 1571|  1.12M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.23k, False: 1.11M]
  ------------------
 1572|  2.23k|        state = other;
 1573|  1.11M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 715k, False: 402k]
  |  Branch (1573:36): [True: 360k, False: 354k]
  |  Branch (1573:55): [True: 177k, False: 183k]
  ------------------
 1574|  1.11M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 32.5k, False: 144k]
  ------------------
 1575|   177k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   144k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   144k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 144k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   322k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 6.96k, False: 137k]
  ------------------
 1576|   177k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|   137k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   137k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 133k, False: 4.94k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   315k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 74.0k, False: 63.9k]
  ------------------
 1577|   177k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  63.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  63.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  59.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 59.0k, False: 4.94k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 58.7k, False: 5.27k]
  ------------------
 1578|   172k|        atts[nAtts].normalized = 0;
 1579|  1.12M|      break;
 1580|   168k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 168k, False: 9.96M]
  ------------------
 1581|   201k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 33.3k, False: 10.0M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   201k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 1.77k, False: 199k]
  ------------------
 1585|  1.77k|        state = other;
 1586|   199k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 180k, False: 19.0k]
  |  Branch (1586:36): [True: 103k, False: 77.2k]
  ------------------
 1587|   103k|        atts[nAtts].normalized = 0;
 1588|   201k|      break;
 1589|   180k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 180k, False: 9.94M]
  ------------------
 1590|   220k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 39.4k, False: 10.0M]
  ------------------
 1591|   220k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.18k, False: 211k]
  ------------------
 1592|  8.18k|        return nAtts;
 1593|   211k|      break;
 1594|   826k|    default:
  ------------------
  |  Branch (1594:5): [True: 826k, False: 9.30M]
  ------------------
 1595|   826k|      break;
 1596|  10.1M|    }
 1597|  10.1M|  }
 1598|       |  /* not reached */
 1599|  8.18k|}
xmltok.c:little2_charRefNumber:
 1602|  3.18k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  3.18k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  3.18k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.18k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  3.18k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  3.18k|#  define MINBPC(enc) 2
  ------------------
 1607|  3.18k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  3.18k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.18k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.18k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 2.26k, False: 917]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  10.3k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  2.26k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  10.3k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  10.3k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 10.3k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 2.23k, False: 8.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  8.11k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.08k|#  define MINBPC(enc) 2
  ------------------
 1610|  8.11k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  8.11k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  8.11k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 8.11k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  8.11k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 8.11k]
  ------------------
 1612|    483|      case ASCII_0:
  ------------------
  |  |   90|    483|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 483, False: 7.63k]
  ------------------
 1613|    724|      case ASCII_1:
  ------------------
  |  |   91|    724|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 241, False: 7.87k]
  ------------------
 1614|  1.00k|      case ASCII_2:
  ------------------
  |  |   92|  1.00k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 278, False: 7.83k]
  ------------------
 1615|  1.23k|      case ASCII_3:
  ------------------
  |  |   93|  1.23k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 229, False: 7.88k]
  ------------------
 1616|  1.48k|      case ASCII_4:
  ------------------
  |  |   94|  1.48k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 254, False: 7.86k]
  ------------------
 1617|  1.88k|      case ASCII_5:
  ------------------
  |  |   95|  1.88k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 398, False: 7.71k]
  ------------------
 1618|  2.16k|      case ASCII_6:
  ------------------
  |  |   96|  2.16k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 279, False: 7.83k]
  ------------------
 1619|  2.42k|      case ASCII_7:
  ------------------
  |  |   97|  2.42k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 259, False: 7.85k]
  ------------------
 1620|  2.65k|      case ASCII_8:
  ------------------
  |  |   98|  2.65k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 234, False: 7.88k]
  ------------------
 1621|  2.91k|      case ASCII_9:
  ------------------
  |  |   99|  2.91k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 259, False: 7.85k]
  ------------------
 1622|  2.91k|        result <<= 4;
 1623|  2.91k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  2.91k|#define ASCII_0 0x30
  ------------------
 1624|  2.91k|        break;
 1625|    247|      case ASCII_A:
  ------------------
  |  |   36|    247|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 247, False: 7.86k]
  ------------------
 1626|    572|      case ASCII_B:
  ------------------
  |  |   37|    572|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 325, False: 7.79k]
  ------------------
 1627|    820|      case ASCII_C:
  ------------------
  |  |   38|    820|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 248, False: 7.86k]
  ------------------
 1628|  1.34k|      case ASCII_D:
  ------------------
  |  |   39|  1.34k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 522, False: 7.59k]
  ------------------
 1629|  1.85k|      case ASCII_E:
  ------------------
  |  |   40|  1.85k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 509, False: 7.60k]
  ------------------
 1630|  2.80k|      case ASCII_F:
  ------------------
  |  |   41|  2.80k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 958, False: 7.15k]
  ------------------
 1631|  2.80k|        result <<= 4;
 1632|  2.80k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  2.80k|#define ASCII_A 0x41
  ------------------
 1633|  2.80k|        break;
 1634|    276|      case ASCII_a:
  ------------------
  |  |   63|    276|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 276, False: 7.83k]
  ------------------
 1635|    709|      case ASCII_b:
  ------------------
  |  |   64|    709|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 433, False: 7.68k]
  ------------------
 1636|    994|      case ASCII_c:
  ------------------
  |  |   65|    994|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 285, False: 7.83k]
  ------------------
 1637|  1.64k|      case ASCII_d:
  ------------------
  |  |   66|  1.64k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 651, False: 7.46k]
  ------------------
 1638|  1.95k|      case ASCII_e:
  ------------------
  |  |   67|  1.95k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 307, False: 7.80k]
  ------------------
 1639|  2.39k|      case ASCII_f:
  ------------------
  |  |   68|  2.39k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 440, False: 7.67k]
  ------------------
 1640|  2.39k|        result <<= 4;
 1641|  2.39k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  2.39k|#define ASCII_a 0x61
  ------------------
 1642|  2.39k|        break;
 1643|  8.11k|      }
 1644|  8.11k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 29, False: 8.08k]
  ------------------
 1645|     29|        return -1;
 1646|  8.11k|    }
 1647|  2.26k|  } else {
 1648|  3.12k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  3.12k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.12k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.12k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 913, False: 2.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  2.21k|#  define MINBPC(enc) 2
  ------------------
 1649|  2.21k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  2.21k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.21k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.21k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  2.21k|      result *= 10;
 1651|  2.21k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  2.21k|#define ASCII_0 0x30
  ------------------
 1652|  2.21k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 4, False: 2.21k]
  ------------------
 1653|      4|        return -1;
 1654|  2.21k|    }
 1655|    917|  }
 1656|  3.14k|  return checkCharRefNumber(result);
 1657|  3.18k|}
xmltok.c:little2_predefinedEntityName:
 1661|   103k|                             const char *end) {
 1662|   103k|  UNUSED_P(enc);
  ------------------
  |  |  135|   103k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|   103k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|   103k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 97.1k, False: 6.56k]
  ------------------
 1664|  1.93k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.93k, False: 101k]
  ------------------
 1665|  1.93k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.93k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.93k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.70k, False: 230]
  |  |  |  |  |  Branch (739:52): [True: 1.33k, False: 364]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|  1.33k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.33k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.33k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 216, False: 1.12k]
  |  |  |  |  |  Branch (738:35): [True: 1.13k, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    981|      case ASCII_l:
  ------------------
  |  |   74|    981|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 981, False: 358]
  ------------------
 1668|    981|        return ASCII_LT;
  ------------------
  |  |  111|    981|#define ASCII_LT 0x3C
  ------------------
 1669|    142|      case ASCII_g:
  ------------------
  |  |   69|    142|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 142, False: 1.19k]
  ------------------
 1670|    142|        return ASCII_GT;
  ------------------
  |  |  113|    142|#define ASCII_GT 0x3E
  ------------------
 1671|  1.33k|      }
 1672|  1.33k|    }
 1673|    810|    break;
 1674|  1.46k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.46k, False: 102k]
  ------------------
 1675|  1.46k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.46k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.46k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.24k, False: 225]
  |  |  |  |  |  Branch (739:52): [True: 1.00k, False: 241]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.00k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.00k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.00k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.00k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.00k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 805, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 603, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    603|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    603|#  define MINBPC(enc) 2
  ------------------
 1679|    603|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    603|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    603|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 406, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 206, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    206|          return ASCII_AMP;
  ------------------
  |  |  105|    206|#define ASCII_AMP 0x26
  ------------------
 1681|    603|      }
 1682|  1.00k|    }
 1683|  1.26k|    break;
 1684|  3.16k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.16k, False: 100k]
  ------------------
 1685|  3.16k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.16k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.16k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 226, False: 2.93k]
  |  |  |  |  |  Branch (738:35): [True: 2.94k, False: 219]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.50k|    case ASCII_q:
  ------------------
  |  |   79|  1.50k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.50k, False: 1.65k]
  ------------------
 1687|  1.50k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.50k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.50k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.50k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.50k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.20k, False: 298]
  |  |  |  |  |  Branch (739:52): [True: 1.00k, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.00k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.00k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.00k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.00k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.00k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 794, False: 214]
  |  |  |  |  |  Branch (739:52): [True: 596, False: 198]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    596|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    596|#  define MINBPC(enc) 2
  ------------------
 1692|    596|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    596|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    596|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 397, False: 199]
  |  |  |  |  |  Branch (739:52): [True: 195, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    195|            return ASCII_QUOT;
  ------------------
  |  |  104|    195|#define ASCII_QUOT 0x22
  ------------------
 1694|    596|        }
 1695|  1.00k|      }
 1696|  1.30k|      break;
 1697|  1.43k|    case ASCII_a:
  ------------------
  |  |   63|  1.43k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.43k, False: 1.72k]
  ------------------
 1698|  1.43k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.43k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.43k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  1.43k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.43k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.23k, False: 198]
  |  |  |  |  |  Branch (739:52): [True: 1.02k, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.02k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.02k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.02k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.02k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.02k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 825, False: 203]
  |  |  |  |  |  Branch (739:52): [True: 598, False: 227]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    598|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    598|#  define MINBPC(enc) 2
  ------------------
 1703|    598|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|    598|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    598|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 404, False: 194]
  |  |  |  |  |  Branch (739:52): [True: 202, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    202|            return ASCII_APOS;
  ------------------
  |  |  106|    202|#define ASCII_APOS 0x27
  ------------------
 1705|    598|        }
 1706|  1.02k|      }
 1707|  1.23k|      break;
 1708|  3.16k|    }
 1709|   103k|  }
 1710|   101k|  return 0;
 1711|   103k|}
xmltok.c:little2_updatePosition:
 1779|  3.62k|                       POSITION *pos) {
 1780|  7.70M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  7.70M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.70M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.70M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   608k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 608k, False: 7.09M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 7.70M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 7.70M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   105k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   105k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 105k, False: 7.60M]
  |  |  ------------------
  |  | 1784|   105k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   105k|    pos->columnNumber++;                                                       \
  |  | 1786|   105k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  14.9k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 14.9k, False: 7.69M]
  ------------------
 1792|  14.9k|      pos->columnNumber = 0;
 1793|  14.9k|      pos->lineNumber++;
 1794|  14.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  14.9k|#  define MINBPC(enc) 2
  ------------------
 1795|  14.9k|      break;
 1796|  17.0k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 17.0k, False: 7.68M]
  ------------------
 1797|  17.0k|      pos->lineNumber++;
 1798|  17.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  17.0k|#  define MINBPC(enc) 2
  ------------------
 1799|  17.0k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  17.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  34.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  17.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 17.0k, False: 39]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  17.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  17.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.98k, False: 8.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.76k, False: 15.2k]
  ------------------
 1800|  1.76k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.76k|#  define MINBPC(enc) 2
  ------------------
 1801|  17.0k|      pos->columnNumber = 0;
 1802|  17.0k|      break;
 1803|  7.56M|    default:
  ------------------
  |  Branch (1803:5): [True: 7.56M, False: 137k]
  ------------------
 1804|  7.56M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.56M|#  define MINBPC(enc) 2
  ------------------
 1805|  7.56M|      pos->columnNumber++;
 1806|  7.56M|      break;
 1807|  7.70M|    }
 1808|  7.70M|  }
 1809|  3.62k|}
xmltok.c:little2_isPublicId:
 1450|    843|                   const char **badPtr) {
 1451|    843|  ptr += MINBPC(enc);
  ------------------
  |  |  783|    843|#  define MINBPC(enc) 2
  ------------------
 1452|    843|  end -= MINBPC(enc);
  ------------------
  |  |  783|    843|#  define MINBPC(enc) 2
  ------------------
 1453|  7.04k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  7.01k|#  define MINBPC(enc) 2
  ------------------
 1454|  7.04k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.04k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.04k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.02k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.02k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    211|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 211, False: 6.83k]
  ------------------
 1456|    728|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 517, False: 6.53k]
  ------------------
 1457|    932|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 204, False: 6.84k]
  ------------------
 1458|  1.32k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 396, False: 6.65k]
  ------------------
 1459|  1.63k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 307, False: 6.74k]
  ------------------
 1460|  1.87k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 242, False: 6.80k]
  ------------------
 1461|  2.07k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 195, False: 6.85k]
  ------------------
 1462|  2.30k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 228, False: 6.82k]
  ------------------
 1463|  2.57k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 274, False: 6.77k]
  ------------------
 1464|  2.81k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 238, False: 6.81k]
  ------------------
 1465|  3.03k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 222, False: 6.82k]
  ------------------
 1466|  3.40k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 374, False: 6.67k]
  ------------------
 1467|  3.85k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 443, False: 6.60k]
  ------------------
 1468|  4.05k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 202, False: 6.84k]
  ------------------
 1469|  4.25k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 198, False: 6.85k]
  ------------------
 1470|  4.45k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 203, False: 6.84k]
  ------------------
 1471|  4.71k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 256, False: 6.79k]
  ------------------
 1472|  5.05k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 344, False: 6.70k]
  ------------------
 1473|  5.05k|#  ifdef XML_NS
 1474|  5.05k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 7.04k]
  ------------------
 1475|  5.05k|#  endif
 1476|  5.05k|      break;
 1477|    263|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 263, False: 6.78k]
  ------------------
 1478|    263|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|    263|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    263|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 263, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 262]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    262|      break;
 1483|    262|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 197, False: 6.85k]
  ------------------
 1484|    896|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 699, False: 6.34k]
  ------------------
 1485|    896|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|    896|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    896|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 896, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 887, False: 9]
  ------------------
 1486|    887|        break;
 1487|       |      /* fall through */
 1488|    844|    default:
  ------------------
  |  Branch (1488:5): [True: 835, False: 6.21k]
  ------------------
 1489|    844|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    844|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    844|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 816, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    351|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 351, False: 493]
  ------------------
 1491|    807|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 456, False: 388]
  ------------------
 1492|    807|        break;
 1493|     37|      default:
  ------------------
  |  Branch (1493:7): [True: 37, False: 807]
  ------------------
 1494|     37|        *badPtr = ptr;
 1495|     37|        return 0;
 1496|    844|      }
 1497|    807|      break;
 1498|  7.04k|    }
 1499|  7.04k|  }
 1500|    805|  return 1;
 1501|    843|}
xmltok.c:big2_prologTok:
 1018|  91.4k|                  const char **nextTokPtr) {
 1019|  91.4k|  int tok;
 1020|  91.4k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 356, False: 91.0k]
  ------------------
 1021|    356|    return XML_TOK_NONE;
  ------------------
  |  |   51|    356|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  91.0k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  91.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  91.0k|    size_t n = end - ptr;
 1024|  91.0k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  91.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 39.6k, False: 51.3k]
  ------------------
 1025|  39.6k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  39.6k|#  define MINBPC(enc) 2
  ------------------
 1026|  39.6k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 18, False: 39.6k]
  ------------------
 1027|     18|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  39.6k|      end = ptr + n;
 1029|  39.6k|    }
 1030|  91.0k|  }
 1031|  91.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  91.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  91.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  88.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 88.2k, False: 2.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|    611|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 611, False: 90.4k]
  ------------------
 1033|    611|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    611|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    611|#  define MINBPC(enc) 2
  ------------------
 1034|  5.51k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 5.51k, False: 85.5k]
  ------------------
 1035|  5.51k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.51k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.51k|#  define MINBPC(enc) 2
  ------------------
 1036|  14.3k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 14.3k, False: 76.7k]
  ------------------
 1037|  14.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.3k|#  define MINBPC(enc) 2
  ------------------
 1038|  14.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.3k|    {                                                                          \
  |  |  |  |  135|  14.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  14.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 14.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  14.3k|    }
  |  |  ------------------
  ------------------
 1039|  14.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  14.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  14.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 7, False: 14.3k]
  |  |  |  |  |  Branch (870:4): [True: 12.4k, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.08k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.08k, False: 7.22k]
  ------------------
 1041|  7.08k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.08k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.08k|#  define MINBPC(enc) 2
  ------------------
 1042|  3.42k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.42k, False: 10.8k]
  ------------------
 1043|  3.42k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.42k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.42k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.21k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.21k, False: 13.1k]
  ------------------
 1045|  1.90k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 697, False: 13.6k]
  ------------------
 1046|  3.77k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.86k, False: 12.4k]
  ------------------
 1047|  3.77k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 14.3k]
  ------------------
 1048|  3.77k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 14.3k]
  ------------------
 1049|  3.79k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 18, False: 14.2k]
  ------------------
 1050|  3.79k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  3.79k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.79k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.79k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  14.3k|    }
 1053|      7|    *nextTokPtr = ptr;
 1054|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
 1055|  14.3k|  }
 1056|  5.55k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 5.55k, False: 85.4k]
  ------------------
 1057|  5.55k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  5.55k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 58, False: 5.49k]
  ------------------
 1058|     58|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     58|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     58|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     58|    }
 1062|       |    /* fall through */
 1063|  21.4k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 15.9k, False: 75.0k]
  ------------------
 1064|  25.9k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 4.46k, False: 86.5k]
  ------------------
 1065|  28.4k|    for (;;) {
 1066|  28.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  28.4k|#  define MINBPC(enc) 2
  ------------------
 1067|  28.4k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  28.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  28.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  28.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 206, False: 28.2k]
  ------------------
 1068|    206|        break;
 1069|  28.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  28.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  28.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 26.6k, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  1.07k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.07k, False: 27.1k]
  ------------------
 1071|  1.96k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 890, False: 27.3k]
  ------------------
 1072|  1.96k|        break;
 1073|    593|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 593, False: 27.6k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    593|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    593|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 588, False: 5]
  ------------------
 1076|    588|          break;
 1077|       |        /* fall through */
 1078|  25.7k|      default:
  ------------------
  |  Branch (1078:7): [True: 25.6k, False: 2.55k]
  ------------------
 1079|  25.7k|        *nextTokPtr = ptr;
 1080|  25.7k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  25.7k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  28.2k|      }
 1082|  28.2k|    }
 1083|    206|    *nextTokPtr = ptr;
 1084|    206|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    206|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.33k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.33k, False: 88.6k]
  ------------------
 1086|  2.33k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.33k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.33k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.80k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.80k, False: 88.2k]
  ------------------
 1088|  2.80k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.80k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.80k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.80k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.13k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.13k, False: 89.8k]
  ------------------
 1091|  1.13k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.13k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.13k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.13k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    566|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 566, False: 90.4k]
  ------------------
 1094|    566|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    566|#  define MINBPC(enc) 2
  ------------------
 1095|    566|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    566|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    566|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    566|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 1, False: 565]
  ------------------
 1096|      1|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      1|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    565|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    565|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    565|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 563, False: 2]
  |  |  |  |  |  Branch (872:49): [True: 42, False: 521]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 26, False: 15]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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|    563|    *nextTokPtr = ptr;
 1105|    563|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    563|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.93k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.93k, False: 86.0k]
  ------------------
 1107|  4.93k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.93k|#  define MINBPC(enc) 2
  ------------------
 1108|  4.93k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.93k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  4.00k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 4.00k, False: 87.0k]
  ------------------
 1110|  4.00k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.00k|#  define MINBPC(enc) 2
  ------------------
 1111|  4.00k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.00k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.00k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.00k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 7, False: 3.99k]
  ------------------
 1112|      7|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      7|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.99k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.99k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.99k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.97k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 24, False: 3.97k]
  |  |  |  |  |  Branch (870:4): [True: 3.97k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    787|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 787, False: 3.20k]
  ------------------
 1115|    787|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    787|#  define MINBPC(enc) 2
  ------------------
 1116|    787|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    787|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    318|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 318, False: 3.67k]
  ------------------
 1118|    318|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    318|#  define MINBPC(enc) 2
  ------------------
 1119|    318|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    318|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    194|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 194, False: 3.80k]
  ------------------
 1121|    194|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    194|#  define MINBPC(enc) 2
  ------------------
 1122|    194|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    194|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    200|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 200, False: 3.79k]
  ------------------
 1124|    516|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 316, False: 3.68k]
  ------------------
 1125|    604|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 88, False: 3.90k]
  ------------------
 1126|  1.05k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 446, False: 3.55k]
  ------------------
 1127|  1.94k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 899, False: 3.09k]
  ------------------
 1128|  2.22k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 279, False: 3.71k]
  ------------------
 1129|  2.67k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 445, False: 3.55k]
  ------------------
 1130|  2.67k|      *nextTokPtr = ptr;
 1131|  2.67k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  2.67k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.99k|    }
 1133|     24|    *nextTokPtr = ptr;
 1134|     24|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.07k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.07k, False: 88.9k]
  ------------------
 1136|  2.07k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.07k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.07k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.07k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.08k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.08k, False: 85.9k]
  ------------------
 1139|  5.08k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.08k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.08k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.08k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  1.98k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 1.98k, False: 89.0k]
  ------------------
 1142|  1.98k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.98k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.98k|#  define MINBPC(enc) 2
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|      0|    LEAD_CASE(2)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 91.0k]
  |  |  ------------------
  |  | 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: 91.0k]
  |  |  ------------------
  |  | 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|     66|    LEAD_CASE(4)
  ------------------
  |  | 1144|     14|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 24, False: 91.0k]
  |  |  ------------------
  |  | 1145|     24|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 10, False: 14]
  |  |  ------------------
  |  | 1146|     14|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     10|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     14|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     14|#    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|     14|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     14|#  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|     14|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     14|#  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|     14|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     14|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  9.96k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 9.96k, False: 81.0k]
  ------------------
 1168|  16.3k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 6.41k, False: 84.6k]
  ------------------
 1169|  16.3k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  16.3k|#define XML_TOK_NAME 18
  ------------------
 1170|  16.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  16.3k|#  define MINBPC(enc) 2
  ------------------
 1171|  16.3k|    break;
 1172|    221|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 221, False: 90.8k]
  ------------------
 1173|    291|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 70, False: 90.9k]
  ------------------
 1174|    574|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 283, False: 90.7k]
  ------------------
 1175|    574|#  ifdef XML_NS
 1176|    574|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 91.0k]
  ------------------
 1177|    574|#  endif
 1178|    574|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    574|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    574|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    574|#  define MINBPC(enc) 2
  ------------------
 1180|    574|    break;
 1181|  2.69k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.69k, False: 88.3k]
  ------------------
 1182|  2.69k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  2.69k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  2.69k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.69k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 2.32k, False: 374]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  2.32k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.32k|#  define MINBPC(enc) 2
  ------------------
 1184|  2.32k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  2.32k|#define XML_TOK_NAME 18
  ------------------
 1185|  2.32k|      break;
 1186|  2.32k|    }
 1187|    374|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    374|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    374|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    374|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 265, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    265|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    265|#  define MINBPC(enc) 2
  ------------------
 1189|    265|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    265|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    265|      break;
 1191|    265|    }
 1192|       |    /* fall through */
 1193|    142|  default:
  ------------------
  |  Branch (1193:3): [True: 33, False: 90.9k]
  ------------------
 1194|    142|    *nextTokPtr = ptr;
 1195|    142|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    142|#define XML_TOK_INVALID 0
  ------------------
 1196|  91.0k|  }
 1197|   108k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|   108k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   108k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   108k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  36.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 36.6k, False: 71.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   415k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  88.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 71.5k, False: 36.7k]
  |  |  ------------------
  |  |   82|  88.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  71.5k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  71.5k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  71.5k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 32, False: 71.5k]
  |  |  ------------------
  |  |   83|     32|      *nextTokPtr = ptr;                                                       \
  |  |   84|     32|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     32|    }                                                                          \
  |  |   86|  88.9k|    /* fall through */                                                         \
  |  |   87|  88.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 7.60k, False: 100k]
  |  |  ------------------
  |  |   88|  87.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 8.50k, False: 99.8k]
  |  |  ------------------
  |  |   89|  88.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 606, False: 107k]
  |  |  ------------------
  |  |   90|  88.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 199, False: 108k]
  |  |  ------------------
  |  |   91|  88.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 443, False: 107k]
  |  |  ------------------
  |  |   92|  88.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  88.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  88.9k|    break;                                                                     \
  |  |   94|  88.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 108k]
  |  |  |  |  ------------------
  |  |  |  |   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: 108k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     19|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 108k]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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;
  |  |  ------------------
  ------------------
 1200|    339|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 339, False: 107k]
  ------------------
 1201|  2.49k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 2.15k, False: 106k]
  ------------------
 1202|  3.52k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 1.02k, False: 107k]
  ------------------
 1203|  4.51k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 996, False: 107k]
  ------------------
 1204|  5.52k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 1.00k, False: 107k]
  ------------------
 1205|  5.52k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 4, False: 108k]
  ------------------
 1206|  14.5k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 8.97k, False: 99.3k]
  ------------------
 1207|  16.4k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.98k, False: 106k]
  ------------------
 1208|  18.2k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 1.73k, False: 106k]
  ------------------
 1209|  18.2k|      *nextTokPtr = ptr;
 1210|  18.2k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 108k]
  ------------------
 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|    204|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 204, False: 108k]
  ------------------
 1232|    204|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    204|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 203]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    203|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    203|#  define MINBPC(enc) 2
  ------------------
 1237|    203|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    203|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    505|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 505, False: 107k]
  ------------------
 1239|    505|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    505|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 504]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    504|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    504|#  define MINBPC(enc) 2
  ------------------
 1244|    504|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    504|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    388|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 388, False: 107k]
  ------------------
 1246|    388|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    388|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 387]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    387|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    387|#  define MINBPC(enc) 2
  ------------------
 1251|    387|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    387|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     17|    default:
  ------------------
  |  Branch (1252:5): [True: 17, False: 108k]
  ------------------
 1253|     17|      *nextTokPtr = ptr;
 1254|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
 1255|   108k|    }
 1256|   108k|  }
 1257|    143|  return -tok;
 1258|  19.5k|}
xmltok.c:big2_scanLit:
  984|  6.12k|                const char **nextTokPtr) {
  985|  15.5M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  15.5M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  15.5M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  15.5M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  72.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 72.9k, False: 15.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  15.5M|    switch (t) {
  988|  44.8k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 15.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 15.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  22.4k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  22.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 22.4k, False: 15.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|  22.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 22.3k]
  |  |  |  |  ------------------
  |  |  |  |   51|  22.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  22.3k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  22.3k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  22.3k|    ptr += n;                                                                  \
  |  |  |  |   57|  22.3k|    break;
  |  |  ------------------
  |  |   63|  22.3k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 7, False: 15.5M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 15.5M]
  |  |  ------------------
  |  |   65|     11|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 15.5M]
  |  |  ------------------
  |  |   66|     11|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     11|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  1.31k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 1.31k, False: 15.5M]
  ------------------
  990|  7.29k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 5.98k, False: 15.5M]
  ------------------
  991|  7.29k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.29k|#  define MINBPC(enc) 2
  ------------------
  992|  7.29k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 1.28k, False: 6.01k]
  ------------------
  993|  1.28k|        break;
  994|  6.01k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.01k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.01k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.01k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 4, False: 6.00k]
  ------------------
  995|      4|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      4|#define XML_TOK_LITERAL 27
  ------------------
  996|  6.00k|      *nextTokPtr = ptr;
  997|  6.00k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.00k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.00k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.98k, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|    961|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 961, False: 5.04k]
  ------------------
  999|  2.05k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.09k, False: 4.91k]
  ------------------
 1000|  2.92k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 876, False: 5.13k]
  ------------------
 1001|  5.94k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 3.01k, False: 2.99k]
  ------------------
 1002|  5.97k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 31, False: 5.97k]
  ------------------
 1003|  5.98k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 12, False: 5.99k]
  ------------------
 1004|  5.98k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  5.98k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     21|      default:
  ------------------
  |  Branch (1005:7): [True: 21, False: 5.98k]
  ------------------
 1006|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
 1007|  6.00k|      }
 1008|  15.5M|    default:
  ------------------
  |  Branch (1008:5): [True: 15.5M, False: 29.7k]
  ------------------
 1009|  15.5M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  15.5M|#  define MINBPC(enc) 2
  ------------------
 1010|  15.5M|      break;
 1011|  15.5M|    }
 1012|  15.5M|  }
 1013|     73|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     73|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  6.12k|}
xmltok.c:big2_scanDecl:
  183|  7.08k|                 const char **nextTokPtr) {
  184|  7.08k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.08k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.08k|    {                                                                          \
  |  |  |  |  135|  7.08k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.08k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  7.08k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 7.08k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  7.08k|    }
  |  |  ------------------
  ------------------
  185|  7.08k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.08k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.08k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.05k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.05k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    564|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 564, False: 6.51k]
  ------------------
  187|    564|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    564|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    564|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 7.08k]
  ------------------
  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|    365|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 365, False: 6.71k]
  ------------------
  192|  6.49k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.12k, False: 954]
  ------------------
  193|  6.49k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.49k|#  define MINBPC(enc) 2
  ------------------
  194|  6.49k|    break;
  195|     24|  default:
  ------------------
  |  Branch (195:3): [True: 24, False: 7.05k]
  ------------------
  196|     24|    *nextTokPtr = ptr;
  197|     24|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  198|  7.08k|  }
  199|  43.3k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  43.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  43.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  43.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  43.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 43.2k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     40|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 40, False: 43.2k]
  ------------------
  202|     40|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     40|    {                                                                          \
  |  |  135|     40|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     40|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     40|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 39]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     40|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     39|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     39|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     39|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|     10|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 35, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 10, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 38]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 38]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 38]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 38]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     39|      }
  212|       |      /* fall through */
  213|  4.12k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.09k, False: 39.2k]
  ------------------
  214|  5.62k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.49k, False: 41.8k]
  ------------------
  215|  6.43k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 809, False: 42.5k]
  ------------------
  216|  6.43k|      *nextTokPtr = ptr;
  217|  6.43k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.43k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  31.3k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 31.3k, False: 11.9k]
  ------------------
  219|  36.8k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 5.49k, False: 37.8k]
  ------------------
  220|  36.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  36.8k|#  define MINBPC(enc) 2
  ------------------
  221|  36.8k|      break;
  222|     31|    default:
  ------------------
  |  Branch (222:5): [True: 31, False: 43.2k]
  ------------------
  223|     31|      *nextTokPtr = ptr;
  224|     31|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  225|  43.3k|    }
  226|  43.3k|  }
  227|     26|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.49k|}
xmltok.c:big2_scanComment:
  146|    776|                    const char **nextTokPtr) {
  147|    776|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    776|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    776|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    776|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 762, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    762|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    762|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    762|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 753, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 751, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     11|      *nextTokPtr = ptr;
  150|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  151|     11|    }
  152|    751|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    751|#  define MINBPC(enc) 2
  ------------------
  153|  39.2k|    while (HAS_CHAR(enc, ptr, end)) {
  154|  39.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  39.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  39.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.48k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.48k, False: 36.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  2.36k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 39.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 39.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.17k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.13k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.17k, False: 38.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.17k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 34, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.13k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     34|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.13k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.13k|#    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.13k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.13k|    break;
  |  |  ------------------
  |  |   63|  1.13k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 27, False: 39.1k]
  |  |  ------------------
  |  |   64|     27|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 39.2k]
  |  |  ------------------
  |  |   65|     35|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 39.2k]
  |  |  ------------------
  |  |   66|     35|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     35|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.11k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.11k, False: 38.1k]
  ------------------
  157|  1.11k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.11k|#  define MINBPC(enc) 2
  ------------------
  158|  1.11k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.11k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.11k|    {                                                                          \
  |  |  |  |  135|  1.11k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.11k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.11k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.11k|    }
  |  |  ------------------
  ------------------
  159|  1.11k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.11k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.11k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 895, False: 220]
  |  |  |  |  |  Branch (872:49): [True: 613, False: 282]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    613|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    613|#  define MINBPC(enc) 2
  ------------------
  161|    613|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    613|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    613|    {                                                                          \
  |  |  |  |  135|    613|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    613|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    613|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 612]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    613|    }
  |  |  ------------------
  ------------------
  162|    612|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    612|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    612|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 599, False: 13]
  |  |  |  |  |  Branch (872:49): [True: 590, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     22|            *nextTokPtr = ptr;
  164|     22|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  165|     22|          }
  166|    590|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    590|#  define MINBPC(enc) 2
  ------------------
  167|    590|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    590|#define XML_TOK_COMMENT 13
  ------------------
  168|    612|        }
  169|    502|        break;
  170|  36.9k|      default:
  ------------------
  |  Branch (170:7): [True: 36.9k, False: 2.32k]
  ------------------
  171|  36.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  36.9k|#  define MINBPC(enc) 2
  ------------------
  172|  36.9k|        break;
  173|  39.2k|      }
  174|  39.2k|    }
  175|    751|  }
  176|     81|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    776|}
xmltok.c:big2_scanPi:
  277|  4.68k|               const char **nextTokPtr) {
  278|  4.68k|  int tok;
  279|  4.68k|  const char *target = ptr;
  280|  4.68k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.68k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.68k|    {                                                                          \
  |  |  |  |  135|  4.68k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.68k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 4.67k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  4.68k|    }
  |  |  ------------------
  ------------------
  281|  4.67k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.67k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.67k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.68k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.68k, False: 990]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.08k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.64k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 962, False: 3.71k]
  |  |  ------------------
  |  |  111|  4.64k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    962|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    962|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    962|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 3, False: 959]
  |  |  ------------------
  |  |  112|      3|      *nextTokPtr = ptr;                                                       \
  |  |  113|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      3|    }                                                                          \
  |  |  115|  4.64k|    /* fall through */                                                         \
  |  |  116|  4.64k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.11k, False: 1.55k]
  |  |  ------------------
  |  |  117|  4.64k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 565, False: 4.11k]
  |  |  ------------------
  |  |  118|  4.64k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  4.64k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  4.64k|    break;                                                                     \
  |  |  120|  4.64k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.67k]
  |  |  |  |  ------------------
  |  |  |  |  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.67k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 4.65k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      8|  default:
  ------------------
  |  Branch (283:3): [True: 8, False: 4.66k]
  ------------------
  284|      8|    *nextTokPtr = ptr;
  285|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  286|  4.67k|  }
  287|   107k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   107k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   107k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   107k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.51k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.51k, False: 97.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|   504k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   102k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 97.9k, False: 9.54k]
  |  |  ------------------
  |  |   82|   102k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  97.9k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  97.9k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  97.9k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 97.8k]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|   102k|    /* fall through */                                                         \
  |  |   87|   102k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.97k, False: 104k]
  |  |  ------------------
  |  |   88|   101k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 711, False: 106k]
  |  |  ------------------
  |  |   89|   101k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 385, False: 107k]
  |  |  ------------------
  |  |   90|   102k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 540, False: 106k]
  |  |  ------------------
  |  |   91|   102k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 374, False: 107k]
  |  |  ------------------
  |  |   92|   102k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   102k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   102k|    break;                                                                     \
  |  |   94|   102k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 107k]
  |  |  |  |  ------------------
  |  |  |  |   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: 107k]
  |  |  |  |  ------------------
  |  |  |  |   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: 107k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 6, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#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.52k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.52k, False: 105k]
  ------------------
  291|  2.08k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 562, False: 106k]
  ------------------
  292|  2.34k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 264, False: 107k]
  ------------------
  293|  2.34k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.34k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.34k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.34k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.34k|#  define MINBPC(enc) 2
  ------------------
  298|  59.0k|      while (HAS_CHAR(enc, ptr, end)) {
  299|  59.0k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  59.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  59.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.36k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.36k, False: 51.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  3.25k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 59.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: 59.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.61k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.58k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.61k, False: 57.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.61k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 1.58k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.58k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.58k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.58k|#    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.58k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.58k|    break;
  |  |  ------------------
  |  |   63|  1.58k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 28, False: 59.0k]
  |  |  ------------------
  |  |   64|     28|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 59.0k]
  |  |  ------------------
  |  |   65|     33|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 59.0k]
  |  |  ------------------
  |  |   66|     33|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     33|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  2.95k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 2.95k, False: 56.1k]
  ------------------
  302|  2.95k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.95k|#  define MINBPC(enc) 2
  ------------------
  303|  2.95k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.95k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.95k|    {                                                                          \
  |  |  |  |  135|  2.95k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.95k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.95k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 2.94k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  2.95k|    }
  |  |  ------------------
  ------------------
  304|  2.94k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.94k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.94k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.71k, False: 231]
  |  |  |  |  |  Branch (872:49): [True: 2.15k, False: 560]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.15k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.15k|#  define MINBPC(enc) 2
  ------------------
  306|  2.15k|            return tok;
  307|  2.15k|          }
  308|    791|          break;
  309|  54.4k|        default:
  ------------------
  |  Branch (309:9): [True: 54.4k, False: 4.60k]
  ------------------
  310|  54.4k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  54.4k|#  define MINBPC(enc) 2
  ------------------
  311|  54.4k|          break;
  312|  59.0k|        }
  313|  59.0k|      }
  314|    121|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    121|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.18k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.18k, False: 105k]
  ------------------
  316|  2.18k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.18k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 2.18k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  2.18k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.18k|#  define MINBPC(enc) 2
  ------------------
  321|  2.18k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.18k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.18k|    {                                                                          \
  |  |  |  |  135|  2.18k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.18k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.18k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 49, False: 2.13k]
  |  |  |  |  ------------------
  |  |  |  |  136|     49|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     49|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     49|      }                                                                        \
  |  |  |  |  138|  2.18k|    }
  |  |  ------------------
  ------------------
  322|  2.13k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.13k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.13k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.11k, False: 13]
  |  |  |  |  |  Branch (872:49): [True: 2.10k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.10k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.10k|#  define MINBPC(enc) 2
  ------------------
  324|  2.10k|        return tok;
  325|  2.10k|      }
  326|       |      /* fall through */
  327|     32|    default:
  ------------------
  |  Branch (327:5): [True: 6, False: 107k]
  ------------------
  328|     32|      *nextTokPtr = ptr;
  329|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  330|   107k|    }
  331|   107k|  }
  332|     73|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     73|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  4.64k|}
xmltok.c:big2_checkPiTarget:
  232|  4.53k|                      int *tokPtr) {
  233|  4.53k|  int upper = 0;
  234|  4.53k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.53k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  4.53k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  4.53k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  4.53k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  4.53k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.69k, False: 2.83k]
  ------------------
  237|  1.69k|    return 1;
  238|  2.83k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.83k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.83k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.23k, False: 600]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.56k|  case ASCII_x:
  ------------------
  |  |   86|  1.56k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.56k, False: 1.27k]
  ------------------
  240|  1.56k|    break;
  241|    566|  case ASCII_X:
  ------------------
  |  |   59|    566|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 566, False: 2.26k]
  ------------------
  242|    566|    upper = 1;
  243|    566|    break;
  244|    704|  default:
  ------------------
  |  Branch (244:3): [True: 704, False: 2.13k]
  ------------------
  245|    704|    return 1;
  246|  2.83k|  }
  247|  2.13k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.13k|#  define MINBPC(enc) 2
  ------------------
  248|  2.13k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.13k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.13k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.47k, False: 658]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    506|  case ASCII_m:
  ------------------
  |  |   75|    506|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 506, False: 1.62k]
  ------------------
  250|    506|    break;
  251|    886|  case ASCII_M:
  ------------------
  |  |   48|    886|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 886, False: 1.24k]
  ------------------
  252|    886|    upper = 1;
  253|    886|    break;
  254|    739|  default:
  ------------------
  |  Branch (254:3): [True: 739, False: 1.39k]
  ------------------
  255|    739|    return 1;
  256|  2.13k|  }
  257|  1.39k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.39k|#  define MINBPC(enc) 2
  ------------------
  258|  1.39k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.39k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.39k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 851, False: 541]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     39|  case ASCII_l:
  ------------------
  |  |   74|     39|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 39, False: 1.35k]
  ------------------
  260|     39|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.39k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.35k|  default:
  ------------------
  |  Branch (264:3): [True: 1.35k, False: 41]
  ------------------
  265|  1.35k|    return 1;
  266|  1.39k|  }
  267|     41|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 38]
  ------------------
  268|      3|    return 0;
  269|     38|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     38|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     38|  return 1;
  271|     41|}
xmltok.c:big2_scanPercent:
  924|  2.33k|                    const char **nextTokPtr) {
  925|  2.33k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.33k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.33k|    {                                                                          \
  |  |  |  |  135|  2.33k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.33k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.33k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 30, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  136|     30|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     30|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     30|      }                                                                        \
  |  |  |  |  138|  2.33k|    }
  |  |  ------------------
  ------------------
  926|  2.30k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.30k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.30k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.85k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.85k, False: 456]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.27k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.19k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 439, False: 1.86k]
  |  |  ------------------
  |  |  111|  1.19k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    439|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    439|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    439|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 426]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  1.19k|    /* fall through */                                                         \
  |  |  116|  1.19k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 389, False: 1.91k]
  |  |  ------------------
  |  |  117|  1.19k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 376, False: 1.93k]
  |  |  ------------------
  |  |  118|  1.19k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.19k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.19k|    break;                                                                     \
  |  |  120|  1.19k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  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.30k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     12|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 2.29k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      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;
  |  |  ------------------
  ------------------
  928|    374|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 374, False: 1.93k]
  ------------------
  929|    724|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 350, False: 1.95k]
  ------------------
  930|  1.08k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 358, False: 1.95k]
  ------------------
  931|  1.08k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.30k]
  ------------------
  932|  1.08k|    *nextTokPtr = ptr;
  933|  1.08k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.08k|#define XML_TOK_PERCENT 22
  ------------------
  934|      7|  default:
  ------------------
  |  Branch (934:3): [True: 7, False: 2.30k]
  ------------------
  935|      7|    *nextTokPtr = ptr;
  936|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  937|  2.30k|  }
  938|  3.06k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  3.06k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.06k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.06k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.48k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.48k, False: 573]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  5.32k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.94k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 545, False: 2.51k]
  |  |  ------------------
  |  |   82|  1.94k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    545|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    545|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    545|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 22, False: 523]
  |  |  ------------------
  |  |   83|     22|      *nextTokPtr = ptr;                                                       \
  |  |   84|     22|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     22|    }                                                                          \
  |  |   86|  1.94k|    /* fall through */                                                         \
  |  |   87|  1.94k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 227, False: 2.83k]
  |  |  ------------------
  |  |   88|  1.12k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 373, False: 2.68k]
  |  |  ------------------
  |  |   89|  1.33k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 214, False: 2.84k]
  |  |  ------------------
  |  |   90|  1.53k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 2.86k]
  |  |  ------------------
  |  |   91|  1.94k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 415, False: 2.64k]
  |  |  ------------------
  |  |   92|  1.94k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.94k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.94k|    break;                                                                     \
  |  |   94|  1.94k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.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: 3.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|     19|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 3.04k]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|     15|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.05k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.05k, False: 2.00k]
  ------------------
  942|  1.05k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.05k|#  define MINBPC(enc) 2
  ------------------
  943|  1.05k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.05k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     16|    default:
  ------------------
  |  Branch (944:5): [True: 16, False: 3.04k]
  ------------------
  945|     16|      *nextTokPtr = ptr;
  946|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  947|  3.06k|    }
  948|  3.06k|  }
  949|     76|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     76|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.19k|}
xmltok.c:big2_scanPoundName:
  954|  1.98k|                      const char **nextTokPtr) {
  955|  1.98k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.98k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.98k|    {                                                                          \
  |  |  |  |  135|  1.98k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.98k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.98k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 1.97k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  1.98k|    }
  |  |  ------------------
  ------------------
  956|  1.97k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.97k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.97k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.87k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.87k, False: 100]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.50k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.93k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 69, False: 1.91k]
  |  |  ------------------
  |  |  111|  1.93k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     69|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     69|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     69|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 55]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  1.93k|    /* fall through */                                                         \
  |  |  116|  1.93k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.33k, False: 640]
  |  |  ------------------
  |  |  117|  1.93k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 540, False: 1.43k]
  |  |  ------------------
  |  |  118|  1.93k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.93k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.93k|    break;                                                                     \
  |  |  120|  1.93k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.97k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.97k]
  |  |  |  |  ------------------
  |  |  |  |  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: 1.95k]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     42|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     21|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      6|  default:
  ------------------
  |  Branch (958:3): [True: 6, False: 1.97k]
  ------------------
  959|      6|    *nextTokPtr = ptr;
  960|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  961|  1.97k|  }
  962|  12.9k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  12.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  12.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.4k, False: 457]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  37.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  11.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 442, False: 12.4k]
  |  |  ------------------
  |  |   82|  11.0k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    442|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    442|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    442|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 10, False: 432]
  |  |  ------------------
  |  |   83|     10|      *nextTokPtr = ptr;                                                       \
  |  |   84|     10|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     10|    }                                                                          \
  |  |   86|  11.0k|    /* fall through */                                                         \
  |  |   87|  11.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.74k, False: 8.18k]
  |  |  ------------------
  |  |   88|  10.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 5.11k, False: 7.82k]
  |  |  ------------------
  |  |   89|  10.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 320, False: 12.6k]
  |  |  ------------------
  |  |   90|  10.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 256, False: 12.6k]
  |  |  ------------------
  |  |   91|  11.0k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 12.7k]
  |  |  ------------------
  |  |   92|  11.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  11.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  11.0k|    break;                                                                     \
  |  |   94|  11.0k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 12.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 12.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 12.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    315|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 315, False: 12.6k]
  ------------------
  966|    555|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 240, False: 12.6k]
  ------------------
  967|  1.08k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 529, False: 12.4k]
  ------------------
  968|  1.35k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 269, False: 12.6k]
  ------------------
  969|  1.54k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 194, False: 12.7k]
  ------------------
  970|  1.54k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 12.9k]
  ------------------
  971|  1.84k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 300, False: 12.6k]
  ------------------
  972|  1.84k|      *nextTokPtr = ptr;
  973|  1.84k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.84k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      9|    default:
  ------------------
  |  Branch (974:5): [True: 9, False: 12.9k]
  ------------------
  975|      9|      *nextTokPtr = ptr;
  976|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  977|  12.9k|    }
  978|  12.9k|  }
  979|     59|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     59|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  1.93k|}
xmltok.c:big2_contentTok:
  824|  81.1k|                   const char **nextTokPtr) {
  825|  81.1k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.13k, False: 79.9k]
  ------------------
  826|  1.13k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.13k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  79.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  79.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  79.9k|    size_t n = end - ptr;
  829|  79.9k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  79.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 23.2k, False: 56.7k]
  ------------------
  830|  23.2k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  23.2k|#  define MINBPC(enc) 2
  ------------------
  831|  23.2k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 92, False: 23.1k]
  ------------------
  832|     92|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     92|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  23.1k|      end = ptr + n;
  834|  23.1k|    }
  835|  79.9k|  }
  836|  79.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  79.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  79.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  70.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 70.4k, False: 9.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  12.8k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 12.8k, False: 67.0k]
  ------------------
  838|  12.8k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  12.8k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  12.8k|#  define MINBPC(enc) 2
  ------------------
  839|  9.69k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 9.69k, False: 70.2k]
  ------------------
  840|  9.69k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  9.69k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  9.69k|#  define MINBPC(enc) 2
  ------------------
  841|  25.2k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 25.2k, False: 54.6k]
  ------------------
  842|  25.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  25.2k|#  define MINBPC(enc) 2
  ------------------
  843|  25.2k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  25.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  25.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  25.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 19, False: 25.2k]
  ------------------
  844|     19|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     19|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  25.2k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  25.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  25.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 18.0k, False: 7.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 335, False: 24.8k]
  ------------------
  846|    335|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    335|#  define MINBPC(enc) 2
  ------------------
  847|  25.2k|    *nextTokPtr = ptr;
  848|  25.2k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  25.2k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  2.52k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 2.52k, False: 77.3k]
  ------------------
  850|  2.52k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.52k|#  define MINBPC(enc) 2
  ------------------
  851|  2.52k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.52k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  8.12k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 8.12k, False: 71.7k]
  ------------------
  853|  8.12k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.12k|#  define MINBPC(enc) 2
  ------------------
  854|  8.12k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  8.12k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.12k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  8.12k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 5, False: 8.12k]
  ------------------
  855|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  8.12k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  8.12k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  8.12k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.91k, False: 1.21k]
  |  |  |  |  |  Branch (872:49): [True: 6.19k, False: 717]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.92k|      break;
  858|  6.19k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.19k|#  define MINBPC(enc) 2
  ------------------
  859|  6.19k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.19k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.19k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.19k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 2, False: 6.19k]
  ------------------
  860|      2|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      2|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  6.19k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  6.19k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.19k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.81k, False: 375]
  |  |  |  |  |  Branch (872:49): [True: 2, False: 5.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  6.19k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  6.19k|#  define MINBPC(enc) 2
  ------------------
  863|  6.19k|      break;
  864|  6.19k|    }
  865|      2|    *nextTokPtr = ptr;
  866|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  867|  2.57k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 79.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 79.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.25k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.20k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.25k, False: 78.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.25k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 55, False: 1.20k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.20k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     55|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.20k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.20k|#    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.20k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.20k|    break;
  |  |  ------------------
  |  |   63|  1.20k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 55, False: 79.8k]
  |  |  ------------------
  |  |   64|     55|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 79.9k]
  |  |  ------------------
  |  |   65|     64|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 79.8k]
  |  |  ------------------
  |  |   66|     64|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     64|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     64|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  20.1k|  default:
  ------------------
  |  Branch (868:3): [True: 20.1k, False: 59.7k]
  ------------------
  869|  20.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  20.1k|#  define MINBPC(enc) 2
  ------------------
  870|  20.1k|    break;
  871|  79.9k|  }
  872|  1.90M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  1.90M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.90M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.90M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  69.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 69.4k, False: 1.83M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.90M]
  |  |  ------------------
  |  |  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.90M]
  |  |  ------------------
  |  |  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|  32.6k|      LEAD_CASE(4)
  ------------------
  |  |  875|  32.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 32.6k, False: 1.87M]
  |  |  ------------------
  |  |  876|  32.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  32.5k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 47, False: 32.5k]
  |  |  ------------------
  |  |  877|     47|      *nextTokPtr = ptr;                                                       \
  |  |  878|     47|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     47|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     47|    }                                                                          \
  |  |  880|  32.5k|    ptr += n;                                                                  \
  |  |  881|  32.5k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  21.5k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 21.5k, False: 1.88M]
  ------------------
  887|  21.5k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  21.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  21.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 21.5k, False: 1]
  |  |  ------------------
  ------------------
  888|  21.5k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  21.5k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  21.5k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 17.4k, False: 4.06k]
  |  |  |  |  |  Branch (872:49): [True: 3.53k, False: 13.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  17.9k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  17.9k|#  define MINBPC(enc) 2
  ------------------
  890|  17.9k|          break;
  891|  17.9k|        }
  892|  3.53k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  3.53k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  3.53k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.53k, False: 1]
  |  |  ------------------
  ------------------
  893|  3.53k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  3.53k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.53k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.23k, False: 1.29k]
  |  |  |  |  |  Branch (872:49): [True: 2, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  3.53k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.53k|#  define MINBPC(enc) 2
  ------------------
  895|  3.53k|            break;
  896|  3.53k|          }
  897|      2|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      2|#  define MINBPC(enc) 2
  ------------------
  898|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  899|  3.53k|        }
  900|  3.53k|      }
  901|       |      /* fall through */
  902|  2.81k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 2.81k, False: 1.90M]
  ------------------
  903|  4.79k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 1.97k, False: 1.90M]
  ------------------
  904|  4.83k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 43, False: 1.90M]
  ------------------
  905|  4.83k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 1.90M]
  ------------------
  906|  4.84k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 5, False: 1.90M]
  ------------------
  907|  27.1k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 22.3k, False: 1.88M]
  ------------------
  908|  29.1k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 1.94k, False: 1.90M]
  ------------------
  909|  29.1k|      *nextTokPtr = ptr;
  910|  29.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  29.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  1.82M|    default:
  ------------------
  |  Branch (911:5): [True: 1.82M, False: 83.2k]
  ------------------
  912|  1.82M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.82M|#  define MINBPC(enc) 2
  ------------------
  913|  1.82M|      break;
  914|  1.90M|    }
  915|  1.90M|  }
  916|    341|  *nextTokPtr = ptr;
  917|    341|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    341|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  29.5k|}
xmltok.c:big2_scanLt:
  726|  12.8k|               const char **nextTokPtr) {
  727|  12.8k|#  ifdef XML_NS
  728|  12.8k|  int hadColon;
  729|  12.8k|#  endif
  730|  12.8k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.8k|    {                                                                          \
  |  |  |  |  135|  12.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  12.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  12.8k|    }
  |  |  ------------------
  ------------------
  731|  12.8k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  12.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.12k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.12k, False: 3.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.4k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  9.14k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.66k, False: 9.14k]
  |  |  ------------------
  |  |  111|  9.14k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  3.66k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  3.66k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.66k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 3.64k]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  9.14k|    /* fall through */                                                         \
  |  |  116|  9.14k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.14k, False: 9.66k]
  |  |  ------------------
  |  |  117|  9.14k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.34k, False: 10.4k]
  |  |  ------------------
  |  |  118|  9.14k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  9.14k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  9.14k|    break;                                                                     \
  |  |  120|  9.14k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |  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: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 12.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    890|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 890, False: 11.9k]
  ------------------
  734|    890|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    890|#  define MINBPC(enc) 2
  ------------------
  735|    890|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    890|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    890|    {                                                                          \
  |  |  |  |  135|    890|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    890|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    890|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 889]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    890|    }
  |  |  ------------------
  ------------------
  736|    889|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    889|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    889|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    878|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 15, False: 874]
  |  |  |  |  |  Branch (870:4): [True: 878, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    212|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 212, False: 677]
  ------------------
  738|    212|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    212|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    212|#  define MINBPC(enc) 2
  ------------------
  739|    662|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 662, False: 227]
  ------------------
  740|    662|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    662|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    662|#  define MINBPC(enc) 2
  ------------------
  741|    889|    }
  742|     15|    *nextTokPtr = ptr;
  743|     15|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  744|  1.26k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 1.26k, False: 11.5k]
  ------------------
  745|  1.26k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.26k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.26k|#  define MINBPC(enc) 2
  ------------------
  746|  1.47k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.47k, False: 11.3k]
  ------------------
  747|  1.47k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.47k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.47k|#  define MINBPC(enc) 2
  ------------------
  748|      9|  default:
  ------------------
  |  Branch (748:3): [True: 9, False: 12.7k]
  ------------------
  749|      9|    *nextTokPtr = ptr;
  750|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  751|  12.8k|  }
  752|  9.14k|#  ifdef XML_NS
  753|  9.14k|  hadColon = 0;
  754|  9.14k|#  endif
  755|       |  /* we have a start-tag */
  756|   629k|  while (HAS_CHAR(enc, ptr, end)) {
  757|   629k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   629k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   629k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.0k, False: 618k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  3.10M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   620k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 618k, False: 11.0k]
  |  |  ------------------
  |  |   82|   620k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   618k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   618k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   618k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 618k]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|   620k|    /* fall through */                                                         \
  |  |   87|   620k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 784, False: 629k]
  |  |  ------------------
  |  |   88|   620k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 504, False: 629k]
  |  |  ------------------
  |  |   89|   620k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 249, False: 629k]
  |  |  ------------------
  |  |   90|   620k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 197, False: 629k]
  |  |  ------------------
  |  |   91|   620k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 246, False: 629k]
  |  |  ------------------
  |  |   92|   620k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   620k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   620k|    break;                                                                     \
  |  |   94|   620k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 629k]
  |  |  |  |  ------------------
  |  |  |  |   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: 629k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     14|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 629k]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 10]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     20|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|     10|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 629k]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  1.55k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.55k, False: 628k]
  ------------------
  777|  2.69k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.14k, False: 628k]
  ------------------
  778|  3.67k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 984, False: 628k]
  ------------------
  779|  3.67k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.67k|#  define MINBPC(enc) 2
  ------------------
  780|  5.02k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.02k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.02k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.02k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.95k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.95k, False: 1.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.37k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.73k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.04k, False: 3.97k]
  |  |  ------------------
  |  |  111|  2.73k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.04k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.04k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.04k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 1.03k]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  2.73k|    /* fall through */                                                         \
  |  |  116|  2.73k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.27k, False: 3.74k]
  |  |  ------------------
  |  |  117|  2.73k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 428, False: 4.59k]
  |  |  ------------------
  |  |  118|  2.73k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.73k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.73k|    break;                                                                     \
  |  |  120|  2.73k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.02k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.02k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 5.00k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    597|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 597, False: 4.42k]
  ------------------
  784|    597|          goto gt;
  785|    270|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 270, False: 4.75k]
  ------------------
  786|    270|          goto sol;
  787|    488|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 488, False: 4.53k]
  ------------------
  788|    885|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 397, False: 4.62k]
  ------------------
  789|  1.38k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 503, False: 4.51k]
  ------------------
  790|  1.38k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.38k|#  define MINBPC(enc) 2
  ------------------
  791|  1.38k|          continue;
  792|      5|        default:
  ------------------
  |  Branch (792:9): [True: 5, False: 5.01k]
  ------------------
  793|      5|          *nextTokPtr = ptr;
  794|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  795|  5.02k|        }
  796|  2.73k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  2.73k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  5.02k|      }
  798|     45|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  3.67k|    }
  800|  5.04k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.04k, False: 624k]
  ------------------
  801|  5.63k|    gt:
  802|  5.63k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.63k|#  define MINBPC(enc) 2
  ------------------
  803|  5.63k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  5.63k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    304|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 304, False: 629k]
  ------------------
  805|    574|    sol:
  806|    574|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    574|#  define MINBPC(enc) 2
  ------------------
  807|    574|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    574|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    574|    {                                                                          \
  |  |  |  |  135|    574|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    574|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    574|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 563]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    574|    }
  |  |  ------------------
  ------------------
  808|    563|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    563|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    563|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 550, False: 13]
  |  |  |  |  |  Branch (872:49): [True: 538, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     25|        *nextTokPtr = ptr;
  810|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  811|     25|      }
  812|    538|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    538|#  define MINBPC(enc) 2
  ------------------
  813|    538|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    538|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     16|    default:
  ------------------
  |  Branch (814:5): [True: 16, False: 629k]
  ------------------
  815|     16|      *nextTokPtr = ptr;
  816|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  817|   629k|    }
  818|   629k|  }
  819|     73|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     73|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  9.14k|}
xmltok.c:big2_scanCdataSection:
  337|    662|                         const char **nextTokPtr) {
  338|    662|  static const char CDATA_LSQB[]
  339|    662|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    662|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    662|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    662|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    662|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    662|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    662|#define ASCII_LSQB 0x5B
  ------------------
  340|    662|  int i;
  341|    662|  UNUSED_P(enc);
  ------------------
  |  |  135|    662|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    662|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    662|    {                                                                          \
  |  |  135|    662|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    662|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    662|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 659]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|    662|    }
  ------------------
  344|  4.54k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.88k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.90k, False: 644]
  ------------------
  345|  3.90k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  3.90k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.90k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.89k, False: 5]
  |  |  |  |  |  Branch (872:49): [True: 3.88k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     15|      *nextTokPtr = ptr;
  347|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  348|     15|    }
  349|  3.90k|  }
  350|    644|  *nextTokPtr = ptr;
  351|    644|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    644|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    659|}
xmltok.c:big2_scanEndTag:
  432|  1.47k|                   const char **nextTokPtr) {
  433|  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.46k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.47k|    }
  |  |  ------------------
  ------------------
  434|  1.46k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.46k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.46k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.04k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.04k, False: 426]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.44k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.44k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 400, False: 1.06k]
  |  |  ------------------
  |  |  111|  1.44k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    400|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    400|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    400|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 399]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  1.44k|    /* fall through */                                                         \
  |  |  116|  1.44k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 607, False: 862]
  |  |  ------------------
  |  |  117|  1.44k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 435, False: 1.03k]
  |  |  ------------------
  |  |  118|  1.44k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.44k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.44k|    break;                                                                     \
  |  |  120|  1.44k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 1.44k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      6|  default:
  ------------------
  |  Branch (436:3): [True: 6, False: 1.46k]
  ------------------
  437|      6|    *nextTokPtr = ptr;
  438|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  439|  1.46k|  }
  440|  2.72k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.72k|    switch (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.35k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.35k, False: 379]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  3.82k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.35k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 351, False: 2.37k]
  |  |  ------------------
  |  |   82|  1.35k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    351|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    351|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    351|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 337]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|  1.35k|    /* fall through */                                                         \
  |  |   87|  1.35k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 217, False: 2.51k]
  |  |  ------------------
  |  |   88|    762|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 208, False: 2.52k]
  |  |  ------------------
  |  |   89|    963|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 201, False: 2.52k]
  |  |  ------------------
  |  |   90|  1.15k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 2.53k]
  |  |  ------------------
  |  |   91|  1.35k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 200, False: 2.52k]
  |  |  ------------------
  |  |   92|  1.35k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.35k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.35k|    break;                                                                     \
  |  |   94|  1.35k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |   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|     22|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 2.70k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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|    223|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 223, False: 2.50k]
  ------------------
  444|    440|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 217, False: 2.51k]
  ------------------
  445|    763|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 323, False: 2.40k]
  ------------------
  446|  1.57k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    763|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    858|#  define MINBPC(enc) 2
  ------------------
  447|  1.57k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.57k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.57k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.54k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.54k, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    345|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 345, False: 1.23k]
  ------------------
  449|    569|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 224, False: 1.35k]
  ------------------
  450|    858|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 289, False: 1.28k]
  ------------------
  451|    858|          break;
  452|    678|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 678, False: 900]
  ------------------
  453|    678|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    678|#  define MINBPC(enc) 2
  ------------------
  454|    678|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    678|#define XML_TOK_END_TAG 5
  ------------------
  455|     42|        default:
  ------------------
  |  Branch (455:9): [True: 42, False: 1.53k]
  ------------------
  456|     42|          *nextTokPtr = ptr;
  457|     42|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
  458|  1.57k|        }
  459|  1.57k|      }
  460|     43|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 2.72k]
  ------------------
  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|    565|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 565, False: 2.16k]
  ------------------
  469|    565|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    565|#  define MINBPC(enc) 2
  ------------------
  470|    565|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    565|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 2.72k]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  2.72k|    }
  475|  2.72k|  }
  476|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.44k|}
xmltok.c:big2_scanAtts:
  573|  2.73k|                 const char **nextTokPtr) {
  574|  2.73k|#  ifdef XML_NS
  575|  2.73k|  int hadColon = 0;
  576|  2.73k|#  endif
  577|   246k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   246k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   246k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   246k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   245k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 245k, False: 845]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  95.2k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  24.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 817, False: 245k]
  |  |  ------------------
  |  |   82|  24.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    817|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    817|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    817|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 803]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|  24.8k|    /* fall through */                                                         \
  |  |   87|  24.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 20.3k, False: 226k]
  |  |  ------------------
  |  |   88|  24.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.12k, False: 243k]
  |  |  ------------------
  |  |   89|  24.4k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 196, False: 246k]
  |  |  ------------------
  |  |   90|  24.6k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 195, False: 246k]
  |  |  ------------------
  |  |   91|  24.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 246k]
  |  |  ------------------
  |  |   92|  24.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  24.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  24.8k|    break;                                                                     \
  |  |   94|  24.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 246k]
  |  |  |  |  ------------------
  |  |  |  |   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: 246k]
  |  |  |  |  ------------------
  |  |  |  |   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: 246k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 246k]
  ------------------
  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|    309|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 309, False: 246k]
  ------------------
  598|    546|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 237, False: 246k]
  ------------------
  599|    764|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 218, False: 246k]
  ------------------
  600|  1.36k|      for (;;) {
  601|  1.36k|        int t;
  602|       |
  603|  1.36k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.36k|#  define MINBPC(enc) 2
  ------------------
  604|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.36k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|  1.36k|    }
  |  |  ------------------
  ------------------
  605|  1.32k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  1.32k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.32k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.29k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.29k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.32k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 691, False: 633]
  ------------------
  607|    691|          break;
  608|    633|        switch (t) {
  609|    207|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 207, False: 426]
  ------------------
  610|    406|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 199, False: 434]
  ------------------
  611|    603|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 197, False: 436]
  ------------------
  612|    603|          break;
  613|     30|        default:
  ------------------
  |  Branch (613:9): [True: 30, False: 603]
  ------------------
  614|     30|          *nextTokPtr = ptr;
  615|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  616|    633|        }
  617|    633|      }
  618|       |      /* fall through */
  619|   221k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 220k, False: 25.6k]
  ------------------
  620|   221k|      int open;
  621|   221k|#  ifdef XML_NS
  622|   221k|      hadColon = 0;
  623|   221k|#  endif
  624|   222k|      for (;;) {
  625|   222k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   222k|#  define MINBPC(enc) 2
  ------------------
  626|   222k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   222k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   222k|    {                                                                          \
  |  |  |  |  135|   222k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   222k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   222k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 222k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|   222k|    }
  |  |  ------------------
  ------------------
  627|   222k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   222k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   222k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   222k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 222k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   222k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 59.4k, False: 162k]
  |  Branch (628:32): [True: 162k, False: 806]
  ------------------
  629|   221k|          break;
  630|    806|        switch (open) {
  631|    248|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 248, False: 558]
  ------------------
  632|    577|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 329, False: 477]
  ------------------
  633|    777|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 200, False: 606]
  ------------------
  634|    777|          break;
  635|     29|        default:
  ------------------
  |  Branch (635:9): [True: 29, False: 777]
  ------------------
  636|     29|          *nextTokPtr = ptr;
  637|     29|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  638|    806|        }
  639|    806|      }
  640|   221k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   221k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  3.29M|      for (;;) {
  643|  3.29M|        int t;
  644|  3.29M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.29M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.29M|    {                                                                          \
  |  |  |  |  135|  3.29M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.29M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  3.29M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 56, False: 3.29M]
  |  |  |  |  ------------------
  |  |  |  |  136|     56|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     56|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     56|      }                                                                        \
  |  |  |  |  138|  3.29M|    }
  |  |  ------------------
  ------------------
  645|  3.29M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  3.29M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.29M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   908k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 908k, False: 2.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  3.29M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 221k, False: 3.07M]
  ------------------
  647|   221k|          break;
  648|  3.07M|        switch (t) {
  649|   108k|          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.07M]
  |  |  |  |  ------------------
  |  |  |  |   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.07M]
  |  |  |  |  ------------------
  |  |  |  |   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|  54.1k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  54.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 54.1k, False: 3.01M]
  |  |  |  |  ------------------
  |  |  |  |   50|  54.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 32, False: 54.0k]
  |  |  |  |  ------------------
  |  |  |  |   51|  54.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     32|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  54.0k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  54.0k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  54.0k|    ptr += n;                                                                  \
  |  |  |  |   57|  54.0k|    break;
  |  |  ------------------
  |  |   63|  54.0k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 7, False: 3.07M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 3.07M]
  |  |  ------------------
  |  |   65|     12|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 3.07M]
  |  |  ------------------
  |  |   66|     12|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  5.17k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 5.17k, False: 3.06M]
  ------------------
  651|  5.17k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|  5.17k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|  5.17k|#  define MINBPC(enc) 2
  ------------------
  652|  5.17k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 13, False: 5.16k]
  ------------------
  653|     13|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 8, False: 5]
  ------------------
  654|      8|              *nextTokPtr = ptr;
  655|     13|            return tok;
  656|     13|          }
  657|  5.16k|          break;
  658|  5.17k|        }
  659|  5.16k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 3, False: 3.07M]
  ------------------
  660|      3|          *nextTokPtr = ptr;
  661|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  662|  3.01M|        default:
  ------------------
  |  Branch (662:9): [True: 3.01M, False: 59.3k]
  ------------------
  663|  3.01M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.01M|#  define MINBPC(enc) 2
  ------------------
  664|  3.01M|          break;
  665|  3.07M|        }
  666|  3.07M|      }
  667|   221k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   221k|#  define MINBPC(enc) 2
  ------------------
  668|   221k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   221k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   221k|    {                                                                          \
  |  |  |  |  135|   221k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   221k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   221k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 221k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   221k|    }
  |  |  ------------------
  ------------------
  669|   221k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   221k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   221k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   221k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 221k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   215k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 215k, False: 5.63k]
  ------------------
  671|   217k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.06k, False: 219k]
  ------------------
  672|   219k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.87k, False: 219k]
  ------------------
  673|   219k|        break;
  674|    288|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 288, False: 221k]
  ------------------
  675|    288|        goto sol;
  676|  1.38k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.38k, False: 219k]
  ------------------
  677|  1.38k|        goto gt;
  678|     21|      default:
  ------------------
  |  Branch (678:7): [True: 21, False: 221k]
  ------------------
  679|     21|        *nextTokPtr = ptr;
  680|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  681|   221k|      }
  682|       |      /* ptr points to closing quote */
  683|   259k|      for (;;) {
  684|   259k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   259k|#  define MINBPC(enc) 2
  ------------------
  685|   259k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   259k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   259k|    {                                                                          \
  |  |  |  |  135|   259k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   259k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   259k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 259k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|   259k|    }
  |  |  ------------------
  ------------------
  686|   259k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   259k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   259k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   256k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 256k, False: 2.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   111k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   219k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.67k, False: 256k]
  |  |  ------------------
  |  |  111|   219k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.67k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.67k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.67k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 10, False: 2.66k]
  |  |  ------------------
  |  |  112|     10|      *nextTokPtr = ptr;                                                       \
  |  |  113|     10|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     10|    }                                                                          \
  |  |  115|   219k|    /* fall through */                                                         \
  |  |  116|   219k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 105k, False: 153k]
  |  |  ------------------
  |  |  117|   219k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 110k, False: 149k]
  |  |  ------------------
  |  |  118|   219k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   219k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   219k|    break;                                                                     \
  |  |  120|   219k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 259k]
  |  |  |  |  ------------------
  |  |  |  |  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: 259k]
  |  |  |  |  ------------------
  |  |  |  |  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: 259k]
  |  |  |  |  ------------------
  |  |  |  |  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|  26.1k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 26.1k, False: 233k]
  ------------------
  689|  26.3k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 238, False: 259k]
  ------------------
  690|  40.0k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 13.6k, False: 245k]
  ------------------
  691|  40.0k|          continue;
  692|    294|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 294, False: 259k]
  ------------------
  693|  1.68k|        gt:
  694|  1.68k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.68k|#  define MINBPC(enc) 2
  ------------------
  695|  1.68k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.68k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    251|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 251, False: 259k]
  ------------------
  697|    539|        sol:
  698|    539|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    539|#  define MINBPC(enc) 2
  ------------------
  699|    539|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    539|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    539|    {                                                                          \
  |  |  |  |  135|    539|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    539|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    539|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 528]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    539|    }
  |  |  ------------------
  ------------------
  700|    528|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    528|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    528|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 516, False: 12]
  |  |  |  |  |  Branch (872:49): [True: 509, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     19|            *nextTokPtr = ptr;
  702|     19|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  703|     19|          }
  704|    509|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    509|#  define MINBPC(enc) 2
  ------------------
  705|    509|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    509|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      8|        default:
  ------------------
  |  Branch (706:9): [True: 8, False: 259k]
  ------------------
  707|      8|          *nextTokPtr = ptr;
  708|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  709|   259k|        }
  710|   219k|        break;
  711|   259k|      }
  712|   219k|      break;
  713|   219k|    }
  714|   219k|    default:
  ------------------
  |  Branch (714:5): [True: 9, False: 246k]
  ------------------
  715|      9|      *nextTokPtr = ptr;
  716|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  717|   246k|    }
  718|   246k|  }
  719|     93|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     93|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.73k|}
xmltok.c:big2_scanRef:
  545|  20.2k|                const char **nextTokPtr) {
  546|  20.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  20.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  20.2k|    {                                                                          \
  |  |  |  |  135|  20.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  20.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  20.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 20.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|  20.2k|    }
  |  |  ------------------
  ------------------
  547|  20.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  20.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  20.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 18.9k, False: 1.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  5.47k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  14.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.19k, False: 19.0k]
  |  |  ------------------
  |  |  111|  14.2k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.19k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.19k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.19k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 6, False: 1.19k]
  |  |  ------------------
  |  |  112|      6|      *nextTokPtr = ptr;                                                       \
  |  |  113|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      6|    }                                                                          \
  |  |  115|  14.2k|    /* fall through */                                                         \
  |  |  116|  14.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.05k, False: 17.1k]
  |  |  ------------------
  |  |  117|  14.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 9.97k, False: 10.2k]
  |  |  ------------------
  |  |  118|  14.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  14.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  14.2k|    break;                                                                     \
  |  |  120|  14.2k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 20.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 20.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 20.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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;
  |  |  ------------------
  ------------------
  549|  5.94k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 5.94k, False: 14.2k]
  ------------------
  550|  5.94k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.94k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.94k|#  define MINBPC(enc) 2
  ------------------
  551|      7|  default:
  ------------------
  |  Branch (551:3): [True: 7, False: 20.1k]
  ------------------
  552|      7|    *nextTokPtr = ptr;
  553|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  554|  20.1k|  }
  555|  30.8k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  30.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  30.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  30.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  25.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 25.5k, False: 5.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  67.7k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  16.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 5.22k, False: 25.5k]
  |  |  ------------------
  |  |   82|  16.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  5.22k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  5.22k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  5.22k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 5.20k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  16.6k|    /* fall through */                                                         \
  |  |   87|  16.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 9.36k, False: 21.4k]
  |  |  ------------------
  |  |   88|  15.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 930, False: 29.8k]
  |  |  ------------------
  |  |   89|  16.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 551, False: 30.2k]
  |  |  ------------------
  |  |   90|  16.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 360, False: 30.4k]
  |  |  ------------------
  |  |   91|  16.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 230, False: 30.5k]
  |  |  ------------------
  |  |   92|  16.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  16.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  16.6k|    break;                                                                     \
  |  |   94|  16.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 30.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: 30.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: 30.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|  14.1k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 14.1k, False: 16.6k]
  ------------------
  559|  14.1k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  14.1k|#  define MINBPC(enc) 2
  ------------------
  560|  14.1k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  14.1k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     12|    default:
  ------------------
  |  Branch (561:5): [True: 12, False: 30.8k]
  ------------------
  562|     12|      *nextTokPtr = ptr;
  563|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  564|  30.8k|    }
  565|  30.8k|  }
  566|     51|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     51|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  14.2k|}
xmltok.c:big2_scanCharRef:
  514|  5.94k|                    const char **nextTokPtr) {
  515|  5.94k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  5.94k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.94k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.94k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 5.94k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  5.94k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  5.94k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.94k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.93k, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 4.02k, False: 1.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  4.02k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.02k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.02k|#  define MINBPC(enc) 2
  ------------------
  518|  1.91k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.91k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.91k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.91k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.91k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.89k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.89k, False: 24]
  ------------------
  520|  1.89k|      break;
  521|     24|    default:
  ------------------
  |  Branch (521:5): [True: 24, False: 1.89k]
  ------------------
  522|     24|      *nextTokPtr = ptr;
  523|     24|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  524|  1.91k|    }
  525|  3.85k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.89k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.96k|#  define MINBPC(enc) 2
  ------------------
  526|  3.85k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.85k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.85k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.82k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.82k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.96k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.96k, False: 1.88k]
  ------------------
  528|  1.96k|        break;
  529|  1.86k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.86k, False: 1.99k]
  ------------------
  530|  1.86k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.86k|#  define MINBPC(enc) 2
  ------------------
  531|  1.86k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.86k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     28|      default:
  ------------------
  |  Branch (532:7): [True: 28, False: 3.82k]
  ------------------
  533|     28|        *nextTokPtr = ptr;
  534|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  535|  3.85k|      }
  536|  3.85k|    }
  537|  1.89k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  5.94k|}
xmltok.c:big2_scanHexCharRef:
  483|  4.02k|                       const char **nextTokPtr) {
  484|  4.02k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.02k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.02k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.02k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.02k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.02k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.02k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.01k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.01k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|    925|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 925, False: 3.09k]
  ------------------
  487|  4.01k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 3.08k, False: 935]
  ------------------
  488|  4.01k|      break;
  489|     10|    default:
  ------------------
  |  Branch (489:5): [True: 10, False: 4.01k]
  ------------------
  490|     10|      *nextTokPtr = ptr;
  491|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  492|  4.02k|    }
  493|  14.3k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  4.01k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.3k|#  define MINBPC(enc) 2
  ------------------
  494|  14.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  14.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  14.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.3k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  5.44k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 5.44k, False: 8.88k]
  ------------------
  496|  10.3k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 4.88k, False: 9.44k]
  ------------------
  497|  10.3k|        break;
  498|  3.96k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 3.96k, False: 10.3k]
  ------------------
  499|  3.96k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.96k|#  define MINBPC(enc) 2
  ------------------
  500|  3.96k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  3.96k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     32|      default:
  ------------------
  |  Branch (501:7): [True: 32, False: 14.2k]
  ------------------
  502|     32|        *nextTokPtr = ptr;
  503|     32|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  504|  14.3k|      }
  505|  14.3k|    }
  506|  4.01k|  }
  507|     15|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.02k|}
xmltok.c:big2_cdataSectionTok:
  356|  8.95k|                        const char **nextTokPtr) {
  357|  8.95k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 155, False: 8.80k]
  ------------------
  358|    155|    return XML_TOK_NONE;
  ------------------
  |  |   51|    155|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  8.80k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  8.80k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  8.80k|    size_t n = end - ptr;
  361|  8.80k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  8.80k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 1.38k, False: 7.42k]
  ------------------
  362|  1.38k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  1.38k|#  define MINBPC(enc) 2
  ------------------
  363|  1.38k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 15, False: 1.36k]
  ------------------
  364|     15|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  1.36k|      end = ptr + n;
  366|  1.36k|    }
  367|  8.80k|  }
  368|  8.78k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.78k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.78k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.38k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.38k, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  2.35k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 2.35k, False: 6.43k]
  ------------------
  370|  2.35k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.35k|#  define MINBPC(enc) 2
  ------------------
  371|  2.35k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.35k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.35k|    {                                                                          \
  |  |  |  |  135|  2.35k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.35k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.35k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 2.35k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  2.35k|    }
  |  |  ------------------
  ------------------
  372|  2.35k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  2.35k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.35k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.77k, False: 579]
  |  |  |  |  |  Branch (872:49): [True: 1.19k, False: 580]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  1.15k|      break;
  374|  1.19k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.19k|#  define MINBPC(enc) 2
  ------------------
  375|  1.19k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.19k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.19k|    {                                                                          \
  |  |  |  |  135|  1.19k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.19k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.19k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.19k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.19k|    }
  |  |  ------------------
  ------------------
  376|  1.19k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  1.19k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.19k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 863, False: 327]
  |  |  |  |  |  Branch (872:49): [True: 328, False: 535]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|    862|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|    862|#  define MINBPC(enc) 2
  ------------------
  378|    862|      break;
  379|    862|    }
  380|    328|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    328|#  define MINBPC(enc) 2
  ------------------
  381|    328|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    328|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  2.72k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 2.72k, False: 6.06k]
  ------------------
  383|  2.72k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.72k|#  define MINBPC(enc) 2
  ------------------
  384|  2.72k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.72k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.72k|    {                                                                          \
  |  |  |  |  135|  2.72k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.72k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.72k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 2.71k]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|  2.72k|    }
  |  |  ------------------
  ------------------
  385|  2.71k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  2.71k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.71k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    991|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 991, False: 1.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 224, False: 2.48k]
  ------------------
  386|    224|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    224|#  define MINBPC(enc) 2
  ------------------
  387|  2.71k|    *nextTokPtr = ptr;
  388|  2.71k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.71k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|    816|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 816, False: 7.97k]
  ------------------
  390|    816|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    816|#  define MINBPC(enc) 2
  ------------------
  391|    816|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    816|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  2.88k|    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.78k]
  |  |  |  |  ------------------
  |  |  |  |   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.78k]
  |  |  |  |  ------------------
  |  |  |  |   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.41k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.35k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.41k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.41k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 67, False: 1.35k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.35k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     67|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.35k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.35k|#    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.35k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.35k|    break;
  |  |  ------------------
  |  |   63|  1.35k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 55, False: 8.73k]
  |  |  ------------------
  |  |   64|     55|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 8.78k]
  |  |  ------------------
  |  |   65|     64|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 8.77k]
  |  |  ------------------
  |  |   66|     64|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     64|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     64|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  1.41k|  default:
  ------------------
  |  Branch (393:3): [True: 1.41k, False: 7.37k]
  ------------------
  394|  1.41k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.41k|#  define MINBPC(enc) 2
  ------------------
  395|  1.41k|    break;
  396|  8.78k|  }
  397|   142k|  while (HAS_CHAR(enc, ptr, end)) {
  398|   142k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   142k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   142k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.2k, False: 130k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 142k]
  |  |  ------------------
  |  |  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: 142k]
  |  |  ------------------
  |  |  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|  3.77k|      LEAD_CASE(4)
  ------------------
  |  |  400|  3.71k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 3.77k, False: 138k]
  |  |  ------------------
  |  |  401|  3.77k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  3.71k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 58, False: 3.71k]
  |  |  ------------------
  |  |  402|     58|      *nextTokPtr = ptr;                                                       \
  |  |  403|     58|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     58|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     58|    }                                                                          \
  |  |  405|  3.71k|    ptr += n;                                                                  \
  |  |  406|  3.71k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     47|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 47, False: 142k]
  ------------------
  412|     47|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 142k]
  ------------------
  413|     51|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 4, False: 142k]
  ------------------
  414|  2.23k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 2.17k, False: 140k]
  ------------------
  415|  2.82k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 593, False: 141k]
  ------------------
  416|  4.59k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 1.76k, False: 140k]
  ------------------
  417|  4.59k|      *nextTokPtr = ptr;
  418|  4.59k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.59k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   133k|    default:
  ------------------
  |  Branch (419:5): [True: 133k, False: 8.36k]
  ------------------
  420|   133k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   133k|#  define MINBPC(enc) 2
  ------------------
  421|   133k|      break;
  422|   142k|    }
  423|   142k|  }
  424|    134|  *nextTokPtr = ptr;
  425|    134|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    134|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  4.78k|}
xmltok.c:big2_attributeValueTok:
 1262|  83.5k|                          const char **nextTokPtr) {
 1263|  83.5k|  const char *start;
 1264|  83.5k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 3.36k, False: 80.1k]
  ------------------
 1265|  3.36k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.36k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  80.1k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  80.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  80.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  80.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 80.1k]
  ------------------
 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|  80.1k|  start = ptr;
 1275|  1.00M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.00M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.00M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.00M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   101k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 101k, False: 901k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.00M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 1.00M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  16.8k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  16.8k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 16.8k, False: 986k]
  |  |  ------------------
  |  | 1279|  16.8k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  16.8k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  7.57k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 7.57k, False: 995k]
  ------------------
 1286|  7.57k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 4.61k, False: 2.95k]
  ------------------
 1287|  4.61k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.61k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.61k|#  define MINBPC(enc) 2
  ------------------
 1288|  2.95k|      *nextTokPtr = ptr;
 1289|  2.95k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.95k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 1.00M]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      1|      *nextTokPtr = ptr;
 1293|      1|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1294|  1.24k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 1.24k, False: 1.00M]
  ------------------
 1295|  1.24k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 802, False: 444]
  ------------------
 1296|    802|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    802|#  define MINBPC(enc) 2
  ------------------
 1297|    802|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    802|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|    802|      }
 1299|    444|      *nextTokPtr = ptr;
 1300|    444|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    444|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  65.9k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 65.9k, False: 937k]
  ------------------
 1302|  65.9k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 39.4k, False: 26.4k]
  ------------------
 1303|  39.4k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  39.4k|#  define MINBPC(enc) 2
  ------------------
 1304|  39.4k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  39.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  39.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  39.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 213, False: 39.2k]
  ------------------
 1305|    213|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    213|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  39.2k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  39.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  39.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 17.9k, False: 21.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 224, False: 39.0k]
  ------------------
 1307|    224|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    224|#  define MINBPC(enc) 2
  ------------------
 1308|  39.2k|        *nextTokPtr = ptr;
 1309|  39.2k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  39.2k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  39.4k|      }
 1311|  26.4k|      *nextTokPtr = ptr;
 1312|  26.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  26.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  4.08k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 4.08k, False: 999k]
  ------------------
 1314|  4.08k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 2.38k, False: 1.69k]
  ------------------
 1315|  2.38k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.38k|#  define MINBPC(enc) 2
  ------------------
 1316|  2.38k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  2.38k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  2.38k|      }
 1318|  1.69k|      *nextTokPtr = ptr;
 1319|  1.69k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.69k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   907k|    default:
  ------------------
  |  Branch (1320:5): [True: 907k, False: 95.6k]
  ------------------
 1321|   907k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   907k|#  define MINBPC(enc) 2
  ------------------
 1322|   907k|      break;
 1323|  1.00M|    }
 1324|  1.00M|  }
 1325|  1.34k|  *nextTokPtr = ptr;
 1326|  1.34k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.34k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  80.1k|}
xmltok.c:big2_entityValueTok:
 1331|  27.7k|                       const char **nextTokPtr) {
 1332|  27.7k|  const char *start;
 1333|  27.7k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.04k, False: 25.7k]
  ------------------
 1334|  2.04k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.04k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  25.7k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  25.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  25.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  25.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 25.7k]
  ------------------
 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|  25.7k|  start = ptr;
 1344|  14.8M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  14.8M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  14.8M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  14.8M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 44.3k, False: 14.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: 14.8M]
  |  |  ------------------
  |  | 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: 14.8M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  12.3k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  12.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 12.3k, False: 14.8M]
  |  |  ------------------
  |  | 1348|  12.3k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  12.3k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  1.29k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 1.29k, False: 14.8M]
  ------------------
 1355|  1.29k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 750, False: 540]
  ------------------
 1356|    750|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    750|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    750|#  define MINBPC(enc) 2
  ------------------
 1357|    540|      *nextTokPtr = ptr;
 1358|    540|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    540|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      6|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 6, False: 14.8M]
  ------------------
 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|  1.69k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 1.69k, False: 14.8M]
  ------------------
 1367|  1.69k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 997, False: 698]
  ------------------
 1368|    997|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    997|#  define MINBPC(enc) 2
  ------------------
 1369|    997|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    997|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|    997|      }
 1371|    698|      *nextTokPtr = ptr;
 1372|    698|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    698|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  21.5k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 21.5k, False: 14.8M]
  ------------------
 1374|  21.5k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 15.9k, False: 5.54k]
  ------------------
 1375|  15.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  15.9k|#  define MINBPC(enc) 2
  ------------------
 1376|  15.9k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  15.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  15.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  15.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 338, False: 15.6k]
  ------------------
 1377|    338|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    338|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  15.6k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  15.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  15.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.7k, False: 3.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 5.50k, False: 10.1k]
  ------------------
 1379|  5.50k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.50k|#  define MINBPC(enc) 2
  ------------------
 1380|  15.6k|        *nextTokPtr = ptr;
 1381|  15.6k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  15.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  15.9k|      }
 1383|  5.54k|      *nextTokPtr = ptr;
 1384|  5.54k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.54k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  14.8M|    default:
  ------------------
  |  Branch (1385:5): [True: 14.8M, False: 36.8k]
  ------------------
 1386|  14.8M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.8M|#  define MINBPC(enc) 2
  ------------------
 1387|  14.8M|      break;
 1388|  14.8M|    }
 1389|  14.8M|  }
 1390|  1.22k|  *nextTokPtr = ptr;
 1391|  1.22k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.22k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  25.7k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  24.0k|                         const char *end1, const char *ptr2) {
 1716|  24.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  99.8k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  75.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 85.9k, False: 13.8k]
  ------------------
 1718|  85.9k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  85.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 37, False: 85.9k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     37|      return 0; /* LCOV_EXCL_LINE */
 1725|     37|    }
 1726|  85.9k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  85.9k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  85.9k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 85.8k, False: 57]
  |  |  |  |  |  Branch (872:49): [True: 75.7k, False: 10.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  10.1k|      return 0;
 1728|  85.9k|  }
 1729|  13.8k|  return ptr1 == end1;
 1730|  24.0k|}
xmltok.c:big2_nameLength:
 1733|  12.2k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  12.2k|  const char *start = ptr;
 1735|   644k|  for (;;) {
 1736|   644k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   644k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   644k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 21.3k, False: 623k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 644k]
  |  |  ------------------
  |  | 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: 644k]
  |  |  ------------------
  |  | 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: 644k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|   623k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 623k, False: 21.3k]
  ------------------
 1746|   628k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 5.31k, False: 639k]
  ------------------
 1747|   628k|#  ifdef XML_NS
 1748|   628k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 644k]
  ------------------
 1749|   628k|#  endif
 1750|   632k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.54k, False: 641k]
  ------------------
 1751|   632k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 58, False: 644k]
  ------------------
 1752|   632k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 132, False: 644k]
  ------------------
 1753|   632k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 55, False: 644k]
  ------------------
 1754|   632k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   632k|#  define MINBPC(enc) 2
  ------------------
 1755|   632k|      break;
 1756|  12.2k|    default:
  ------------------
  |  Branch (1756:5): [True: 12.2k, False: 632k]
  ------------------
 1757|  12.2k|      return (int)(ptr - start);
 1758|   644k|    }
 1759|   644k|  }
 1760|  12.2k|}
xmltok.c:big2_getAtts:
 1510|  8.47k|                ATTRIBUTE *atts) {
 1511|  8.47k|  enum { other, inName, inValue } state = inName;
 1512|  8.47k|  int nAtts = 0;
 1513|  8.47k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  7.90M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  8.47k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  7.89M|#  define MINBPC(enc) 2
  ------------------
 1517|  7.90M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.90M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.90M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.57M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.57M, False: 4.32M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 7.90M]
  |  |  ------------------
  |  | 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: 7.90M]
  |  |  ------------------
  |  | 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|  88.5k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  88.5k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 88.5k, False: 7.81M]
  |  |  ------------------
  |  | 1528|  88.5k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  88.5k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 88.5k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|  88.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  88.5k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  4.23M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 4.23M, False: 3.66M]
  ------------------
 1535|  4.55M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 327k, False: 7.57M]
  ------------------
 1536|  4.80M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 246k, False: 7.65M]
  ------------------
 1537|  4.80M|      START_NAME
  ------------------
  |  | 1519|  4.80M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 428k, False: 4.37M]
  |  |  ------------------
  |  | 1520|   428k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 217k, False: 211k]
  |  |  ------------------
  |  | 1521|   217k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   217k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   217k|      }                                                                        \
  |  | 1524|   428k|      state = inName;                                                          \
  |  | 1525|   428k|    }
  ------------------
 1538|  4.80M|      break;
 1539|      0|#  undef START_NAME
 1540|   392k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 392k, False: 7.50M]
  ------------------
 1541|   392k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 114k, False: 278k]
  ------------------
 1542|   114k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 58.2k, False: 56.0k]
  ------------------
 1543|  58.2k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  58.2k|#  define MINBPC(enc) 2
  ------------------
 1544|   114k|        state = inValue;
 1545|   114k|        open = BT_QUOT;
 1546|   278k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 114k, False: 164k]
  ------------------
 1547|   114k|        state = other;
 1548|   114k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 58.2k, False: 56.0k]
  ------------------
 1549|  58.2k|          atts[nAtts].valueEnd = ptr;
 1550|   114k|        nAtts++;
 1551|   114k|      }
 1552|   392k|      break;
 1553|   628k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 628k, False: 7.27M]
  ------------------
 1554|   628k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 314k, False: 314k]
  ------------------
 1555|   314k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 158k, False: 155k]
  ------------------
 1556|   158k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   158k|#  define MINBPC(enc) 2
  ------------------
 1557|   314k|        state = inValue;
 1558|   314k|        open = BT_APOS;
 1559|   314k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 314k, False: 539]
  ------------------
 1560|   314k|        state = other;
 1561|   314k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 158k, False: 155k]
  ------------------
 1562|   158k|          atts[nAtts].valueEnd = ptr;
 1563|   314k|        nAtts++;
 1564|   314k|      }
 1565|   628k|      break;
 1566|  5.96k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 5.96k, False: 7.89M]
  ------------------
 1567|  5.96k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 5.11k, False: 851]
  ------------------
 1568|  5.11k|        atts[nAtts].normalized = 0;
 1569|  5.96k|      break;
 1570|  1.00M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.00M, False: 6.89M]
  ------------------
 1571|  1.00M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 1.48k, False: 1.00M]
  ------------------
 1572|  1.48k|        state = other;
 1573|  1.00M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 531k, False: 472k]
  |  Branch (1573:36): [True: 268k, False: 263k]
  |  Branch (1573:55): [True: 157k, False: 110k]
  ------------------
 1574|  1.00M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 33.1k, False: 124k]
  ------------------
 1575|   157k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|   124k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|   124k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 124k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   281k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 289, False: 123k]
  ------------------
 1576|   157k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|   123k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|   123k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 97.9k, False: 26.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   281k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 72.6k, False: 51.3k]
  ------------------
 1577|   157k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  51.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  51.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: 26.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 7.43k, False: 43.9k]
  ------------------
 1578|   113k|        atts[nAtts].normalized = 0;
 1579|  1.00M|      break;
 1580|   114k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 114k, False: 7.78M]
  ------------------
 1581|   152k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 37.2k, False: 7.86M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   152k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 1.87k, False: 150k]
  ------------------
 1585|  1.87k|        state = other;
 1586|   150k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 117k, False: 32.8k]
  |  Branch (1586:36): [True: 78.7k, False: 38.5k]
  ------------------
 1587|  78.7k|        atts[nAtts].normalized = 0;
 1588|   152k|      break;
 1589|   277k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 277k, False: 7.62M]
  ------------------
 1590|   285k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 8.71k, False: 7.89M]
  ------------------
 1591|   285k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.47k, False: 277k]
  ------------------
 1592|  8.47k|        return nAtts;
 1593|   277k|      break;
 1594|   535k|    default:
  ------------------
  |  Branch (1594:5): [True: 535k, False: 7.36M]
  ------------------
 1595|   535k|      break;
 1596|  7.90M|    }
 1597|  7.90M|  }
 1598|       |  /* not reached */
 1599|  8.47k|}
xmltok.c:big2_charRefNumber:
 1602|  4.19k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  4.19k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  4.19k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.19k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  4.19k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  4.19k|#  define MINBPC(enc) 2
  ------------------
 1607|  4.19k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  4.19k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.19k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.19k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 2.68k, False: 1.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  12.4k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  2.68k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  12.4k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  12.4k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 12.4k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 2.66k, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  9.80k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  9.77k|#  define MINBPC(enc) 2
  ------------------
 1610|  9.80k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  9.80k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  9.80k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 9.80k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  9.80k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 9.80k]
  ------------------
 1612|    398|      case ASCII_0:
  ------------------
  |  |   90|    398|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 398, False: 9.40k]
  ------------------
 1613|    636|      case ASCII_1:
  ------------------
  |  |   91|    636|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 238, False: 9.56k]
  ------------------
 1614|  1.46k|      case ASCII_2:
  ------------------
  |  |   92|  1.46k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 830, False: 8.97k]
  ------------------
 1615|  1.83k|      case ASCII_3:
  ------------------
  |  |   93|  1.83k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 373, False: 9.42k]
  ------------------
 1616|  2.46k|      case ASCII_4:
  ------------------
  |  |   94|  2.46k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 621, False: 9.18k]
  ------------------
 1617|  3.26k|      case ASCII_5:
  ------------------
  |  |   95|  3.26k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 805, False: 8.99k]
  ------------------
 1618|  3.60k|      case ASCII_6:
  ------------------
  |  |   96|  3.60k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 336, False: 9.46k]
  ------------------
 1619|  3.87k|      case ASCII_7:
  ------------------
  |  |   97|  3.87k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 276, False: 9.52k]
  ------------------
 1620|  4.09k|      case ASCII_8:
  ------------------
  |  |   98|  4.09k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 218, False: 9.58k]
  ------------------
 1621|  4.46k|      case ASCII_9:
  ------------------
  |  |   99|  4.46k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 365, False: 9.43k]
  ------------------
 1622|  4.46k|        result <<= 4;
 1623|  4.46k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  4.46k|#define ASCII_0 0x30
  ------------------
 1624|  4.46k|        break;
 1625|    205|      case ASCII_A:
  ------------------
  |  |   36|    205|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 205, False: 9.59k]
  ------------------
 1626|    973|      case ASCII_B:
  ------------------
  |  |   37|    973|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 768, False: 9.03k]
  ------------------
 1627|  1.21k|      case ASCII_C:
  ------------------
  |  |   38|  1.21k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 238, False: 9.56k]
  ------------------
 1628|  1.60k|      case ASCII_D:
  ------------------
  |  |   39|  1.60k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 397, False: 9.40k]
  ------------------
 1629|  1.91k|      case ASCII_E:
  ------------------
  |  |   40|  1.91k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 305, False: 9.49k]
  ------------------
 1630|  2.65k|      case ASCII_F:
  ------------------
  |  |   41|  2.65k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 745, False: 9.05k]
  ------------------
 1631|  2.65k|        result <<= 4;
 1632|  2.65k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  2.65k|#define ASCII_A 0x41
  ------------------
 1633|  2.65k|        break;
 1634|    340|      case ASCII_a:
  ------------------
  |  |   63|    340|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 340, False: 9.46k]
  ------------------
 1635|    787|      case ASCII_b:
  ------------------
  |  |   64|    787|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 447, False: 9.35k]
  ------------------
 1636|    987|      case ASCII_c:
  ------------------
  |  |   65|    987|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 200, False: 9.60k]
  ------------------
 1637|  1.53k|      case ASCII_d:
  ------------------
  |  |   66|  1.53k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 543, False: 9.25k]
  ------------------
 1638|  1.85k|      case ASCII_e:
  ------------------
  |  |   67|  1.85k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 320, False: 9.48k]
  ------------------
 1639|  2.68k|      case ASCII_f:
  ------------------
  |  |   68|  2.68k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 834, False: 8.96k]
  ------------------
 1640|  2.68k|        result <<= 4;
 1641|  2.68k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  2.68k|#define ASCII_a 0x61
  ------------------
 1642|  2.68k|        break;
 1643|  9.80k|      }
 1644|  9.80k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 28, False: 9.77k]
  ------------------
 1645|     28|        return -1;
 1646|  9.80k|    }
 1647|  2.68k|  } else {
 1648|  4.52k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  4.52k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.52k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.52k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1.49k, False: 3.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.02k|#  define MINBPC(enc) 2
  ------------------
 1649|  3.03k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  3.03k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.03k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.03k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  3.03k|      result *= 10;
 1651|  3.03k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.03k|#define ASCII_0 0x30
  ------------------
 1652|  3.03k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 5, False: 3.02k]
  ------------------
 1653|      5|        return -1;
 1654|  3.03k|    }
 1655|  1.50k|  }
 1656|  4.15k|  return checkCharRefNumber(result);
 1657|  4.19k|}
xmltok.c:big2_predefinedEntityName:
 1661|  11.5k|                             const char *end) {
 1662|  11.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  11.5k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|  11.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 5.30k, False: 6.25k]
  ------------------
 1664|  1.28k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.28k, False: 10.2k]
  ------------------
 1665|  1.28k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  1.28k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.28k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.06k, False: 220]
  |  |  |  |  |  Branch (872:49): [True: 654, False: 412]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    654|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    654|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    654|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 277, False: 377]
  |  |  |  |  |  Branch (871:32): [True: 390, False: 264]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    118|      case ASCII_l:
  ------------------
  |  |   74|    118|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 118, False: 536]
  ------------------
 1668|    118|        return ASCII_LT;
  ------------------
  |  |  111|    118|#define ASCII_LT 0x3C
  ------------------
 1669|    259|      case ASCII_g:
  ------------------
  |  |   69|    259|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 259, False: 395]
  ------------------
 1670|    259|        return ASCII_GT;
  ------------------
  |  |  113|    259|#define ASCII_GT 0x3E
  ------------------
 1671|    654|      }
 1672|    654|    }
 1673|    909|    break;
 1674|  1.49k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.49k, False: 10.0k]
  ------------------
 1675|  1.49k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.49k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.49k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.28k, False: 208]
  |  |  |  |  |  Branch (872:49): [True: 1.05k, False: 232]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.05k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.05k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.05k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.05k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.05k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 842, False: 210]
  |  |  |  |  |  Branch (872:49): [True: 605, False: 237]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    605|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    605|#  define MINBPC(enc) 2
  ------------------
 1679|    605|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    605|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    605|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 404, False: 201]
  |  |  |  |  |  Branch (872:49): [True: 205, False: 199]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    205|          return ASCII_AMP;
  ------------------
  |  |  105|    205|#define ASCII_AMP 0x26
  ------------------
 1681|    605|      }
 1682|  1.05k|    }
 1683|  1.28k|    break;
 1684|  3.47k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.47k, False: 8.08k]
  ------------------
 1685|  3.47k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.47k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.47k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 279, False: 3.20k]
  |  |  |  |  |  Branch (871:32): [True: 3.26k, False: 213]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.55k|    case ASCII_q:
  ------------------
  |  |   79|  1.55k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.55k, False: 1.92k]
  ------------------
 1687|  1.55k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.55k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.55k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  1.55k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.55k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.33k, False: 221]
  |  |  |  |  |  Branch (872:49): [True: 992, False: 346]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|    992|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    992|#  define MINBPC(enc) 2
  ------------------
 1690|    992|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|    992|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    992|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 791, False: 201]
  |  |  |  |  |  Branch (872:49): [True: 597, False: 194]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    597|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    597|#  define MINBPC(enc) 2
  ------------------
 1692|    597|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  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: 397, False: 200]
  |  |  |  |  |  Branch (872:49): [True: 196, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    196|            return ASCII_QUOT;
  ------------------
  |  |  104|    196|#define ASCII_QUOT 0x22
  ------------------
 1694|    597|        }
 1695|    992|      }
 1696|  1.36k|      break;
 1697|  1.64k|    case ASCII_a:
  ------------------
  |  |   63|  1.64k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.64k, False: 1.83k]
  ------------------
 1698|  1.64k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.64k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.64k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  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.22k, False: 420]
  |  |  |  |  |  Branch (872:49): [True: 988, False: 233]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|    988|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    988|#  define MINBPC(enc) 2
  ------------------
 1701|    988|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|    988|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    988|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 790, False: 198]
  |  |  |  |  |  Branch (872:49): [True: 594, False: 196]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    594|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    594|#  define MINBPC(enc) 2
  ------------------
 1703|    594|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|    594|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    594|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 390, False: 204]
  |  |  |  |  |  Branch (872:49): [True: 196, False: 194]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    196|            return ASCII_APOS;
  ------------------
  |  |  106|    196|#define ASCII_APOS 0x27
  ------------------
 1705|    594|        }
 1706|    988|      }
 1707|  1.44k|      break;
 1708|  3.47k|    }
 1709|  11.5k|  }
 1710|  10.5k|  return 0;
 1711|  11.5k|}
xmltok.c:big2_updatePosition:
 1779|  3.62k|                       POSITION *pos) {
 1780|  4.20M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  4.20M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.20M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.20M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   332k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 332k, False: 3.87M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.20M]
  |  |  ------------------
  |  | 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.20M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  56.6k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  56.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 56.6k, False: 4.14M]
  |  |  ------------------
  |  | 1784|  56.6k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  56.6k|    pos->columnNumber++;                                                       \
  |  | 1786|  56.6k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  8.38k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 8.38k, False: 4.19M]
  ------------------
 1792|  8.38k|      pos->columnNumber = 0;
 1793|  8.38k|      pos->lineNumber++;
 1794|  8.38k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.38k|#  define MINBPC(enc) 2
  ------------------
 1795|  8.38k|      break;
 1796|  73.8k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 73.8k, False: 4.12M]
  ------------------
 1797|  73.8k|      pos->lineNumber++;
 1798|  73.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  73.8k|#  define MINBPC(enc) 2
  ------------------
 1799|  73.8k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  73.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   147k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  73.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 73.8k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  73.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  73.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  41.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 41.5k, False: 32.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.02k, False: 72.8k]
  ------------------
 1800|  1.02k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.02k|#  define MINBPC(enc) 2
  ------------------
 1801|  73.8k|      pos->columnNumber = 0;
 1802|  73.8k|      break;
 1803|  4.06M|    default:
  ------------------
  |  Branch (1803:5): [True: 4.06M, False: 138k]
  ------------------
 1804|  4.06M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.06M|#  define MINBPC(enc) 2
  ------------------
 1805|  4.06M|      pos->columnNumber++;
 1806|  4.06M|      break;
 1807|  4.20M|    }
 1808|  4.20M|  }
 1809|  3.62k|}
xmltok.c:big2_isPublicId:
 1450|    918|                   const char **badPtr) {
 1451|    918|  ptr += MINBPC(enc);
  ------------------
  |  |  916|    918|#  define MINBPC(enc) 2
  ------------------
 1452|    918|  end -= MINBPC(enc);
  ------------------
  |  |  916|    918|#  define MINBPC(enc) 2
  ------------------
 1453|  6.39k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  6.35k|#  define MINBPC(enc) 2
  ------------------
 1454|  6.39k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.39k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.39k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.37k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.37k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    198|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 198, False: 6.19k]
  ------------------
 1456|    750|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 552, False: 5.83k]
  ------------------
 1457|    959|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 209, False: 6.18k]
  ------------------
 1458|  1.28k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 328, False: 6.06k]
  ------------------
 1459|  1.49k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 205, False: 6.18k]
  ------------------
 1460|  1.69k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 203, False: 6.18k]
  ------------------
 1461|  1.89k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 196, False: 6.19k]
  ------------------
 1462|  2.11k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 222, False: 6.16k]
  ------------------
 1463|  2.32k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 208, False: 6.18k]
  ------------------
 1464|  2.54k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 226, False: 6.16k]
  ------------------
 1465|  2.75k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 211, False: 6.18k]
  ------------------
 1466|  3.02k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 271, False: 6.12k]
  ------------------
 1467|  3.30k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 277, False: 6.11k]
  ------------------
 1468|  3.50k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 202, False: 6.18k]
  ------------------
 1469|  3.70k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 195, False: 6.19k]
  ------------------
 1470|  3.89k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 195, False: 6.19k]
  ------------------
 1471|  4.10k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 202, False: 6.18k]
  ------------------
 1472|  4.36k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 268, False: 6.12k]
  ------------------
 1473|  4.36k|#  ifdef XML_NS
 1474|  4.36k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 6.39k]
  ------------------
 1475|  4.36k|#  endif
 1476|  4.36k|      break;
 1477|    227|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 227, False: 6.16k]
  ------------------
 1478|    227|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|    227|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    227|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 227, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 226]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    226|      break;
 1483|    449|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 449, False: 5.94k]
  ------------------
 1484|  1.11k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 663, False: 5.72k]
  ------------------
 1485|  1.11k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|  1.11k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.11k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.11k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 1.10k, False: 11]
  ------------------
 1486|  1.10k|        break;
 1487|       |      /* fall through */
 1488|    695|    default:
  ------------------
  |  Branch (1488:5): [True: 684, False: 5.70k]
  ------------------
 1489|    695|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    695|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    695|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 674, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    275|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 275, False: 420]
  ------------------
 1491|    661|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 386, False: 309]
  ------------------
 1492|    661|        break;
 1493|     34|      default:
  ------------------
  |  Branch (1493:7): [True: 34, False: 661]
  ------------------
 1494|     34|        *badPtr = ptr;
 1495|     34|        return 0;
 1496|    695|      }
 1497|    661|      break;
 1498|  6.39k|    }
 1499|  6.39k|  }
 1500|    883|  return 1;
 1501|    918|}

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

