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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  16.6k|sip_tokey(struct sipkey *key, const void *src) {
  149|  16.6k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  16.6k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  16.6k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  16.6k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  16.6k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  16.6k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  16.6k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  16.6k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  16.6k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  16.6k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  16.6k|  return key;
  152|  16.6k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  16.6k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  16.6k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  16.6k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  16.6k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  16.6k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  16.6k|sip24_final(struct siphash *H) {
  232|  16.6k|  const char left = (char)(H->p - H->buf);
  233|  16.6k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  16.6k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 16.6k]
  ------------------
  236|  1.29k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.29k, False: 15.3k]
  ------------------
  237|  1.29k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  4.35k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.05k, False: 13.5k]
  ------------------
  240|  4.35k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  5.55k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.19k, False: 15.4k]
  ------------------
  243|  5.55k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  8.55k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.00k, False: 13.6k]
  ------------------
  246|  8.55k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  9.71k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.16k, False: 15.4k]
  ------------------
  249|  9.71k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  12.4k|  case 2:
  ------------------
  |  Branch (251:3): [True: 2.71k, False: 13.9k]
  ------------------
  252|  12.4k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  13.7k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.29k, False: 15.3k]
  ------------------
  255|  13.7k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  16.6k|  case 0:
  ------------------
  |  Branch (257:3): [True: 2.92k, False: 13.7k]
  ------------------
  258|  16.6k|    break;
  259|  16.6k|  }
  260|       |
  261|  16.6k|  H->v3 ^= b;
  262|  16.6k|  sip_round(H, 2);
  263|  16.6k|  H->v0 ^= b;
  264|  16.6k|  H->v2 ^= 0xff;
  265|  16.6k|  sip_round(H, 4);
  266|       |
  267|  16.6k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  16.6k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  38.6M|sip_round(struct siphash *H, const int rounds) {
  168|  38.6M|  int i;
  169|       |
  170|   115M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 77.3M, False: 38.6M]
  ------------------
  171|  77.3M|    H->v0 += H->v1;
  172|  77.3M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  77.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  77.3M|    H->v1 ^= H->v0;
  174|  77.3M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  77.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  77.3M|    H->v2 += H->v3;
  177|  77.3M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  77.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  77.3M|    H->v3 ^= H->v2;
  179|       |
  180|  77.3M|    H->v0 += H->v3;
  181|  77.3M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  77.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  77.3M|    H->v3 ^= H->v0;
  183|       |
  184|  77.3M|    H->v2 += H->v1;
  185|  77.3M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  77.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  77.3M|    H->v1 ^= H->v2;
  187|  77.3M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  77.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  77.3M|  }
  189|  38.6M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  16.6k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  16.6k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  16.6k|  uint64_t m;
  210|       |
  211|  38.6M|  do {
  212|   347M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   347M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 347M, False: 16.6k]
  |  Branch (212:22): [True: 309M, False: 38.6M]
  ------------------
  213|   309M|      *H->p++ = *p++;
  214|       |
  215|  38.6M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  38.6M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 13.7k, False: 38.6M]
  ------------------
  216|  13.7k|      break;
  217|       |
  218|  38.6M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  38.6M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  38.6M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  38.6M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  38.6M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  38.6M|    H->v3 ^= m;
  220|  38.6M|    sip_round(H, 2);
  221|  38.6M|    H->v0 ^= m;
  222|       |
  223|  38.6M|    H->p = H->buf;
  224|  38.6M|    H->c += 8;
  225|  38.6M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 38.6M, False: 2.92k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  16.6k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  16.6k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  16.6k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  16.6k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  16.6k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  16.6k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  16.6k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  16.6k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  16.6k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  16.6k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  16.6k|  H->p = H->buf;
  199|  16.6k|  H->c = 0;
  200|       |
  201|  16.6k|  return H;
  202|  16.6k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  4.08M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  4.08M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  4.08M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  4.08M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  4.08M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  4.08M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  4.08M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  4.08M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  4.08M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  4.08M|  H->p = H->buf;
  199|  4.08M|  H->c = 0;
  200|       |
  201|  4.08M|  return H;
  202|  4.08M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  4.08M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  4.08M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  4.08M|  uint64_t m;
  210|       |
  211|  4.66M|  do {
  212|  13.8M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  9.74M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 9.74M, False: 4.08M]
  |  Branch (212:22): [True: 9.16M, False: 585k]
  ------------------
  213|  9.16M|      *H->p++ = *p++;
  214|       |
  215|  4.66M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  4.66M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 4.06M, False: 600k]
  ------------------
  216|  4.06M|      break;
  217|       |
  218|   600k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   600k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   600k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   600k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   600k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   600k|    H->v3 ^= m;
  220|   600k|    sip_round(H, 2);
  221|   600k|    H->v0 ^= m;
  222|       |
  223|   600k|    H->p = H->buf;
  224|   600k|    H->c += 8;
  225|   600k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 585k, False: 14.9k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  4.08M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  8.76M|sip_round(struct siphash *H, const int rounds) {
  168|  8.76M|  int i;
  169|       |
  170|  34.4M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 25.7M, False: 8.76M]
  ------------------
  171|  25.7M|    H->v0 += H->v1;
  172|  25.7M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  25.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  25.7M|    H->v1 ^= H->v0;
  174|  25.7M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  25.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  25.7M|    H->v2 += H->v3;
  177|  25.7M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  25.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  25.7M|    H->v3 ^= H->v2;
  179|       |
  180|  25.7M|    H->v0 += H->v3;
  181|  25.7M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  25.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  25.7M|    H->v3 ^= H->v0;
  183|       |
  184|  25.7M|    H->v2 += H->v1;
  185|  25.7M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  25.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  25.7M|    H->v1 ^= H->v2;
  187|  25.7M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  25.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  25.7M|  }
  189|  8.76M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  4.08M|sip24_final(struct siphash *H) {
  232|  4.08M|  const char left = (char)(H->p - H->buf);
  233|  4.08M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  4.08M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 4.08M]
  ------------------
  236|  6.84k|  case 7:
  ------------------
  |  Branch (236:3): [True: 6.84k, False: 4.07M]
  ------------------
  237|  6.84k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  15.9k|  case 6:
  ------------------
  |  Branch (239:3): [True: 9.12k, False: 4.07M]
  ------------------
  240|  15.9k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  25.4k|  case 5:
  ------------------
  |  Branch (242:3): [True: 9.49k, False: 4.07M]
  ------------------
  243|  25.4k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  39.1k|  case 4:
  ------------------
  |  Branch (245:3): [True: 13.7k, False: 4.06M]
  ------------------
  246|  39.1k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  57.9k|  case 3:
  ------------------
  |  Branch (248:3): [True: 18.7k, False: 4.06M]
  ------------------
  249|  57.9k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|   140k|  case 2:
  ------------------
  |  Branch (251:3): [True: 82.5k, False: 4.00M]
  ------------------
  252|   140k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  4.06M|  case 1:
  ------------------
  |  Branch (254:3): [True: 3.92M, False: 155k]
  ------------------
  255|  4.06M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  4.08M|  case 0:
  ------------------
  |  Branch (257:3): [True: 15.0k, False: 4.06M]
  ------------------
  258|  4.08M|    break;
  259|  4.08M|  }
  260|       |
  261|  4.08M|  H->v3 ^= b;
  262|  4.08M|  sip_round(H, 2);
  263|  4.08M|  H->v0 ^= b;
  264|  4.08M|  H->v2 ^= 0xff;
  265|  4.08M|  sip_round(H, 4);
  266|       |
  267|  4.08M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  4.08M|} /* sip24_final() */

XML_ParserCreate:
  719|  16.6k|XML_ParserCreate(const XML_Char *encodingName) {
  720|  16.6k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  721|  16.6k|}
XML_ParserCreate_MM:
  970|  16.6k|                    const XML_Char *nameSep) {
  971|  16.6k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  972|  16.6k|}
XML_ParserFree:
 1441|  16.6k|XML_ParserFree(XML_Parser parser) {
 1442|  16.6k|  TAG *tagList;
 1443|  16.6k|  OPEN_INTERNAL_ENTITY *entityList;
 1444|  16.6k|  if (parser == NULL)
  ------------------
  |  Branch (1444:7): [True: 0, False: 16.6k]
  ------------------
 1445|      0|    return;
 1446|       |  /* free m_tagStack and m_freeTagList */
 1447|  16.6k|  tagList = parser->m_tagStack;
 1448|  3.61M|  for (;;) {
 1449|  3.61M|    TAG *p;
 1450|  3.61M|    if (tagList == NULL) {
  ------------------
  |  Branch (1450:9): [True: 16.8k, False: 3.60M]
  ------------------
 1451|  16.8k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1451:11): [True: 16.6k, False: 216]
  ------------------
 1452|  16.6k|        break;
 1453|    216|      tagList = parser->m_freeTagList;
 1454|    216|      parser->m_freeTagList = NULL;
 1455|    216|    }
 1456|  3.60M|    p = tagList;
 1457|  3.60M|    tagList = tagList->parent;
 1458|  3.60M|    FREE(parser, p->buf);
  ------------------
  |  |  716|  3.60M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1459|  3.60M|    destroyBindings(p->bindings, parser);
 1460|  3.60M|    FREE(parser, p);
  ------------------
  |  |  716|  3.60M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1461|  3.60M|  }
 1462|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1463|  16.6k|  entityList = parser->m_openInternalEntities;
 1464|  18.0k|  for (;;) {
 1465|  18.0k|    OPEN_INTERNAL_ENTITY *openEntity;
 1466|  18.0k|    if (entityList == NULL) {
  ------------------
  |  Branch (1466:9): [True: 17.2k, False: 789]
  ------------------
 1467|  17.2k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1467:11): [True: 16.6k, False: 558]
  ------------------
 1468|  16.6k|        break;
 1469|    558|      entityList = parser->m_freeInternalEntities;
 1470|    558|      parser->m_freeInternalEntities = NULL;
 1471|    558|    }
 1472|  1.34k|    openEntity = entityList;
 1473|  1.34k|    entityList = entityList->next;
 1474|  1.34k|    FREE(parser, openEntity);
  ------------------
  |  |  716|  1.34k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1475|  1.34k|  }
 1476|       |
 1477|  16.6k|  destroyBindings(parser->m_freeBindingList, parser);
 1478|  16.6k|  destroyBindings(parser->m_inheritedBindings, parser);
 1479|  16.6k|  poolDestroy(&parser->m_tempPool);
 1480|  16.6k|  poolDestroy(&parser->m_temp2Pool);
 1481|  16.6k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  716|  16.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1482|  16.6k|#ifdef XML_DTD
 1483|       |  /* external parameter entity parsers share the DTD structure
 1484|       |     parser->m_dtd with the root parser, so we must not destroy it
 1485|       |  */
 1486|  16.6k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1486:7): [True: 16.6k, False: 0]
  |  Branch (1486:36): [True: 16.6k, False: 0]
  ------------------
 1487|       |#else
 1488|       |  if (parser->m_dtd)
 1489|       |#endif /* XML_DTD */
 1490|  16.6k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1491|  16.6k|               &parser->m_mem);
 1492|  16.6k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  716|  16.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1493|       |#ifdef XML_ATTR_INFO
 1494|       |  FREE(parser, (void *)parser->m_attInfo);
 1495|       |#endif
 1496|  16.6k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  716|  16.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  16.6k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|  16.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  16.6k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|  16.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  16.6k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  716|  16.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  16.6k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  716|  16.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1501|  16.6k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1501:7): [True: 0, False: 16.6k]
  ------------------
 1502|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1503|  16.6k|  FREE(parser, parser);
  ------------------
  |  |  716|  16.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1504|  16.6k|}
XML_SetElementHandler:
 1596|  16.6k|                      XML_EndElementHandler end) {
 1597|  16.6k|  if (parser == NULL)
  ------------------
  |  Branch (1597:7): [True: 0, False: 16.6k]
  ------------------
 1598|      0|    return;
 1599|  16.6k|  parser->m_startElementHandler = start;
 1600|  16.6k|  parser->m_endElementHandler = end;
 1601|  16.6k|}
XML_SetHashSalt:
 1816|  16.6k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1817|  16.6k|  if (parser == NULL)
  ------------------
  |  Branch (1817:7): [True: 0, False: 16.6k]
  ------------------
 1818|      0|    return 0;
 1819|  16.6k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1819:7): [True: 0, False: 16.6k]
  ------------------
 1820|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1821|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1822|  16.6k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1822:7): [True: 0, False: 16.6k]
  ------------------
 1823|  16.6k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1823:10): [True: 0, False: 16.6k]
  ------------------
 1824|      0|    return 0;
 1825|  16.6k|  parser->m_hash_secret_salt = hash_salt;
 1826|  16.6k|  return 1;
 1827|  16.6k|}
XML_ParseBuffer:
 1984|  16.6k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1985|  16.6k|  const char *start;
 1986|  16.6k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  16.6k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1987|       |
 1988|  16.6k|  if (parser == NULL)
  ------------------
  |  Branch (1988:7): [True: 0, False: 16.6k]
  ------------------
 1989|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1990|  16.6k|  switch (parser->m_parsingStatus.parsing) {
 1991|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1991:3): [True: 0, False: 16.6k]
  ------------------
 1992|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1993|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1994|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1994:3): [True: 0, False: 16.6k]
  ------------------
 1995|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1996|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1997|  16.6k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1997:3): [True: 16.6k, False: 0]
  ------------------
 1998|       |    /* Has someone called XML_GetBuffer successfully before? */
 1999|  16.6k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1999:9): [True: 0, False: 16.6k]
  ------------------
 2000|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2001|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2002|      0|    }
 2003|       |
 2004|  16.6k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2004:9): [True: 16.6k, False: 0]
  |  Branch (2004:43): [True: 0, False: 16.6k]
  ------------------
 2005|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2006|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2007|      0|    }
 2008|       |    /* fall through */
 2009|  16.6k|  default:
  ------------------
  |  Branch (2009:3): [True: 0, False: 16.6k]
  ------------------
 2010|  16.6k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2011|  16.6k|  }
 2012|       |
 2013|  16.6k|  start = parser->m_bufferPtr;
 2014|  16.6k|  parser->m_positionPtr = start;
 2015|  16.6k|  parser->m_bufferEnd += len;
 2016|  16.6k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2017|  16.6k|  parser->m_parseEndByteIndex += len;
 2018|  16.6k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2019|       |
 2020|  16.6k|  parser->m_errorCode = parser->m_processor(
 2021|  16.6k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2022|       |
 2023|  16.6k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2023:7): [True: 7.81k, False: 8.83k]
  ------------------
 2024|  7.81k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2025|  7.81k|    parser->m_processor = errorProcessor;
 2026|  7.81k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  7.81k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2027|  8.83k|  } else {
 2028|  8.83k|    switch (parser->m_parsingStatus.parsing) {
 2029|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2029:5): [True: 0, False: 8.83k]
  ------------------
 2030|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2031|      0|      break;
 2032|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2032:5): [True: 0, False: 8.83k]
  ------------------
 2033|  8.83k|    case XML_PARSING:
  ------------------
  |  Branch (2033:5): [True: 8.83k, False: 0]
  ------------------
 2034|  8.83k|      if (isFinal) {
  ------------------
  |  Branch (2034:11): [True: 0, False: 8.83k]
  ------------------
 2035|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2036|      0|        return result;
 2037|      0|      }
 2038|  8.83k|    default:; /* should not happen */
  ------------------
  |  Branch (2038:5): [True: 0, False: 8.83k]
  ------------------
 2039|  8.83k|    }
 2040|  8.83k|  }
 2041|       |
 2042|  8.83k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  8.83k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2043|  8.83k|                    parser->m_bufferPtr, &parser->m_position);
 2044|  8.83k|  parser->m_positionPtr = parser->m_bufferPtr;
 2045|  8.83k|  return result;
 2046|  16.6k|}
XML_GetBuffer:
 2049|  16.6k|XML_GetBuffer(XML_Parser parser, int len) {
 2050|  16.6k|  if (parser == NULL)
  ------------------
  |  Branch (2050:7): [True: 0, False: 16.6k]
  ------------------
 2051|      0|    return NULL;
 2052|  16.6k|  if (len < 0) {
  ------------------
  |  Branch (2052:7): [True: 0, False: 16.6k]
  ------------------
 2053|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2054|      0|    return NULL;
 2055|      0|  }
 2056|  16.6k|  switch (parser->m_parsingStatus.parsing) {
 2057|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2057:3): [True: 0, False: 16.6k]
  ------------------
 2058|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2059|      0|    return NULL;
 2060|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2060:3): [True: 0, False: 16.6k]
  ------------------
 2061|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2062|      0|    return NULL;
 2063|  16.6k|  default:;
  ------------------
  |  Branch (2063:3): [True: 16.6k, False: 0]
  ------------------
 2064|  16.6k|  }
 2065|       |
 2066|  16.6k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  200|  16.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 16.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2066:7): [True: 16.6k, False: 0]
  ------------------
 2067|  16.6k|#ifdef XML_CONTEXT_BYTES
 2068|  16.6k|    int keep;
 2069|  16.6k|#endif /* defined XML_CONTEXT_BYTES */
 2070|       |    /* Do not invoke signed arithmetic overflow: */
 2071|  16.6k|    int neededSize = (int)((unsigned)len
 2072|  16.6k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  200|  16.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 16.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2073|  16.6k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2074|  16.6k|    if (neededSize < 0) {
  ------------------
  |  Branch (2074:9): [True: 0, False: 16.6k]
  ------------------
 2075|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2076|      0|      return NULL;
 2077|      0|    }
 2078|  16.6k|#ifdef XML_CONTEXT_BYTES
 2079|  16.6k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  200|  16.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 16.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2080|  16.6k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   98|  16.6k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2080:9): [True: 0, False: 16.6k]
  ------------------
 2081|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   98|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2082|       |    /* Detect and prevent integer overflow */
 2083|  16.6k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2083:9): [True: 0, False: 16.6k]
  ------------------
 2084|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2085|      0|      return NULL;
 2086|      0|    }
 2087|  16.6k|    neededSize += keep;
 2088|  16.6k|#endif /* defined XML_CONTEXT_BYTES */
 2089|  16.6k|    if (neededSize
  ------------------
  |  Branch (2089:9): [True: 0, False: 16.6k]
  ------------------
 2090|  16.6k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  200|  16.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 16.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2091|      0|#ifdef XML_CONTEXT_BYTES
 2092|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2092:11): [True: 0, False: 0]
  ------------------
 2093|      0|        int offset
 2094|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2095|      0|              - keep;
 2096|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2097|       |         * in the buffer */
 2098|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2099|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2100|      0|        parser->m_bufferEnd -= offset;
 2101|      0|        parser->m_bufferPtr -= offset;
 2102|      0|      }
 2103|       |#else
 2104|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2105|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2106|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2107|       |        parser->m_bufferEnd
 2108|       |            = parser->m_buffer
 2109|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2110|       |        parser->m_bufferPtr = parser->m_buffer;
 2111|       |      }
 2112|       |#endif /* not defined XML_CONTEXT_BYTES */
 2113|  16.6k|    } else {
 2114|  16.6k|      char *newBuf;
 2115|  16.6k|      int bufferSize
 2116|  16.6k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  200|  16.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 16.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2117|  16.6k|      if (bufferSize == 0)
  ------------------
  |  Branch (2117:11): [True: 16.6k, False: 0]
  ------------------
 2118|  16.6k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  247|  16.6k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2119|  26.0k|      do {
 2120|       |        /* Do not invoke signed arithmetic overflow: */
 2121|  26.0k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2122|  26.0k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2122:16): [True: 9.43k, False: 16.6k]
  |  Branch (2122:43): [True: 9.43k, False: 0]
  ------------------
 2123|  16.6k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2123:11): [True: 0, False: 16.6k]
  ------------------
 2124|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2125|      0|        return NULL;
 2126|      0|      }
 2127|  16.6k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  714|  16.6k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2128|  16.6k|      if (newBuf == 0) {
  ------------------
  |  Branch (2128:11): [True: 0, False: 16.6k]
  ------------------
 2129|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2130|      0|        return NULL;
 2131|      0|      }
 2132|  16.6k|      parser->m_bufferLim = newBuf + bufferSize;
 2133|  16.6k|#ifdef XML_CONTEXT_BYTES
 2134|  16.6k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2134:11): [True: 0, False: 16.6k]
  ------------------
 2135|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2136|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2137|      0|                   + keep);
 2138|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2139|      0|        parser->m_buffer = newBuf;
 2140|      0|        parser->m_bufferEnd
 2141|      0|            = parser->m_buffer
 2142|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2143|      0|              + keep;
 2144|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2145|  16.6k|      } else {
 2146|       |        /* This must be a brand new buffer with no data in it yet */
 2147|  16.6k|        parser->m_bufferEnd = newBuf;
 2148|  16.6k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2149|  16.6k|      }
 2150|       |#else
 2151|       |      if (parser->m_bufferPtr) {
 2152|       |        memcpy(newBuf, parser->m_bufferPtr,
 2153|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2154|       |        FREE(parser, parser->m_buffer);
 2155|       |        parser->m_bufferEnd
 2156|       |            = newBuf
 2157|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2158|       |      } else {
 2159|       |        /* This must be a brand new buffer with no data in it yet */
 2160|       |        parser->m_bufferEnd = newBuf;
 2161|       |      }
 2162|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2163|       |#endif /* not defined XML_CONTEXT_BYTES */
 2164|  16.6k|    }
 2165|  16.6k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2166|  16.6k|    parser->m_positionPtr = NULL;
 2167|  16.6k|  }
 2168|  16.6k|  return parser->m_bufferEnd;
 2169|  16.6k|}
xmlparse.c:parserCreate:
  977|  16.6k|             DTD *dtd) {
  978|  16.6k|  XML_Parser parser;
  979|       |
  980|  16.6k|  if (memsuite) {
  ------------------
  |  Branch (980:7): [True: 0, False: 16.6k]
  ------------------
  981|      0|    XML_Memory_Handling_Suite *mtemp;
  982|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  983|      0|    if (parser != NULL) {
  ------------------
  |  Branch (983:9): [True: 0, False: 0]
  ------------------
  984|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  985|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  986|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  987|      0|      mtemp->free_fcn = memsuite->free_fcn;
  988|      0|    }
  989|  16.6k|  } else {
  990|  16.6k|    XML_Memory_Handling_Suite *mtemp;
  991|  16.6k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  992|  16.6k|    if (parser != NULL) {
  ------------------
  |  Branch (992:9): [True: 16.6k, False: 0]
  ------------------
  993|  16.6k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  994|  16.6k|      mtemp->malloc_fcn = malloc;
  995|  16.6k|      mtemp->realloc_fcn = realloc;
  996|  16.6k|      mtemp->free_fcn = free;
  997|  16.6k|    }
  998|  16.6k|  }
  999|       |
 1000|  16.6k|  if (! parser)
  ------------------
  |  Branch (1000:7): [True: 0, False: 16.6k]
  ------------------
 1001|      0|    return parser;
 1002|       |
 1003|  16.6k|  parser->m_buffer = NULL;
 1004|  16.6k|  parser->m_bufferLim = NULL;
 1005|       |
 1006|  16.6k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  244|  16.6k|#define INIT_ATTS_SIZE 16
  ------------------
 1007|  16.6k|  parser->m_atts
 1008|  16.6k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  714|  16.6k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1009|  16.6k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1009:7): [True: 0, False: 16.6k]
  ------------------
 1010|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1011|      0|    return NULL;
 1012|      0|  }
 1013|       |#ifdef XML_ATTR_INFO
 1014|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1015|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1016|       |  if (parser->m_attInfo == NULL) {
 1017|       |    FREE(parser, parser->m_atts);
 1018|       |    FREE(parser, parser);
 1019|       |    return NULL;
 1020|       |  }
 1021|       |#endif
 1022|  16.6k|  parser->m_dataBuf
 1023|  16.6k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  714|  16.6k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1024|  16.6k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1024:7): [True: 0, False: 16.6k]
  ------------------
 1025|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1026|       |#ifdef XML_ATTR_INFO
 1027|       |    FREE(parser, parser->m_attInfo);
 1028|       |#endif
 1029|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1030|      0|    return NULL;
 1031|      0|  }
 1032|  16.6k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  243|  16.6k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1033|       |
 1034|  16.6k|  if (dtd)
  ------------------
  |  Branch (1034:7): [True: 0, False: 16.6k]
  ------------------
 1035|      0|    parser->m_dtd = dtd;
 1036|  16.6k|  else {
 1037|  16.6k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1038|  16.6k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1038:9): [True: 0, False: 16.6k]
  ------------------
 1039|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1041|       |#ifdef XML_ATTR_INFO
 1042|       |      FREE(parser, parser->m_attInfo);
 1043|       |#endif
 1044|      0|      FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1045|      0|      return NULL;
 1046|      0|    }
 1047|  16.6k|  }
 1048|       |
 1049|  16.6k|  parser->m_freeBindingList = NULL;
 1050|  16.6k|  parser->m_freeTagList = NULL;
 1051|  16.6k|  parser->m_freeInternalEntities = NULL;
 1052|       |
 1053|  16.6k|  parser->m_groupSize = 0;
 1054|  16.6k|  parser->m_groupConnector = NULL;
 1055|       |
 1056|  16.6k|  parser->m_unknownEncodingHandler = NULL;
 1057|  16.6k|  parser->m_unknownEncodingHandlerData = NULL;
 1058|       |
 1059|  16.6k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  16.6k|#define ASCII_EXCL 0x21
  ------------------
 1060|  16.6k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|  16.6k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1062|       |
 1063|  16.6k|  parser->m_nsAtts = NULL;
 1064|  16.6k|  parser->m_nsAttsVersion = 0;
 1065|  16.6k|  parser->m_nsAttsPower = 0;
 1066|       |
 1067|  16.6k|  parser->m_protocolEncodingName = NULL;
 1068|       |
 1069|  16.6k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1070|  16.6k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1071|  16.6k|  parserInit(parser, encodingName);
 1072|       |
 1073|  16.6k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1073:7): [True: 16.6k, False: 0]
  |  Branch (1073:23): [True: 0, False: 16.6k]
  ------------------
 1074|      0|    if (dtd) {
  ------------------
  |  Branch (1074:9): [True: 0, False: 0]
  ------------------
 1075|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1076|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1077|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1078|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1079|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1080|      0|      parser->m_dtd = NULL;
 1081|      0|    }
 1082|      0|    XML_ParserFree(parser);
 1083|      0|    return NULL;
 1084|      0|  }
 1085|       |
 1086|  16.6k|  if (nameSep) {
  ------------------
  |  Branch (1086:7): [True: 0, False: 16.6k]
  ------------------
 1087|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1088|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  163|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1089|      0|    parser->m_namespaceSeparator = *nameSep;
 1090|  16.6k|  } else {
 1091|  16.6k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  162|  16.6k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1092|  16.6k|  }
 1093|       |
 1094|  16.6k|  return parser;
 1095|  16.6k|}
xmlparse.c:dtdCreate:
 6716|  16.6k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6717|  16.6k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6718|  16.6k|  if (p == NULL)
  ------------------
  |  Branch (6718:7): [True: 0, False: 16.6k]
  ------------------
 6719|      0|    return p;
 6720|  16.6k|  poolInit(&(p->pool), ms);
 6721|  16.6k|  poolInit(&(p->entityValuePool), ms);
 6722|  16.6k|  hashTableInit(&(p->generalEntities), ms);
 6723|  16.6k|  hashTableInit(&(p->elementTypes), ms);
 6724|  16.6k|  hashTableInit(&(p->attributeIds), ms);
 6725|  16.6k|  hashTableInit(&(p->prefixes), ms);
 6726|  16.6k|#ifdef XML_DTD
 6727|  16.6k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6728|  16.6k|  hashTableInit(&(p->paramEntities), ms);
 6729|  16.6k|#endif /* XML_DTD */
 6730|  16.6k|  p->defaultPrefix.name = NULL;
 6731|  16.6k|  p->defaultPrefix.binding = NULL;
 6732|       |
 6733|  16.6k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6734|  16.6k|  p->scaffIndex = NULL;
 6735|  16.6k|  p->scaffold = NULL;
 6736|  16.6k|  p->scaffLevel = 0;
 6737|  16.6k|  p->scaffSize = 0;
 6738|  16.6k|  p->scaffCount = 0;
 6739|  16.6k|  p->contentStringLen = 0;
 6740|       |
 6741|  16.6k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  16.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6742|  16.6k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  16.6k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6744|  16.6k|  return p;
 6745|  16.6k|}
xmlparse.c:hashTableInit:
 7150|  83.2k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7151|  83.2k|  p->power = 0;
 7152|  83.2k|  p->size = 0;
 7153|  83.2k|  p->used = 0;
 7154|  83.2k|  p->v = NULL;
 7155|  83.2k|  p->mem = ms;
 7156|  83.2k|}
xmlparse.c:poolInit:
 7175|  66.6k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7176|  66.6k|  pool->blocks = NULL;
 7177|  66.6k|  pool->freeBlocks = NULL;
 7178|  66.6k|  pool->start = NULL;
 7179|  66.6k|  pool->ptr = NULL;
 7180|  66.6k|  pool->end = NULL;
 7181|  66.6k|  pool->mem = ms;
 7182|  66.6k|}
xmlparse.c:parserInit:
 1098|  16.6k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1099|  16.6k|  parser->m_processor = prologInitProcessor;
 1100|  16.6k|  XmlPrologStateInit(&parser->m_prologState);
 1101|  16.6k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1101:7): [True: 16.6k, False: 0]
  ------------------
 1102|  16.6k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1103|  16.6k|  }
 1104|  16.6k|  parser->m_curBase = NULL;
 1105|  16.6k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1106|  16.6k|  parser->m_userData = NULL;
 1107|  16.6k|  parser->m_handlerArg = NULL;
 1108|  16.6k|  parser->m_startElementHandler = NULL;
 1109|  16.6k|  parser->m_endElementHandler = NULL;
 1110|  16.6k|  parser->m_characterDataHandler = NULL;
 1111|  16.6k|  parser->m_processingInstructionHandler = NULL;
 1112|  16.6k|  parser->m_commentHandler = NULL;
 1113|  16.6k|  parser->m_startCdataSectionHandler = NULL;
 1114|  16.6k|  parser->m_endCdataSectionHandler = NULL;
 1115|  16.6k|  parser->m_defaultHandler = NULL;
 1116|  16.6k|  parser->m_startDoctypeDeclHandler = NULL;
 1117|  16.6k|  parser->m_endDoctypeDeclHandler = NULL;
 1118|  16.6k|  parser->m_unparsedEntityDeclHandler = NULL;
 1119|  16.6k|  parser->m_notationDeclHandler = NULL;
 1120|  16.6k|  parser->m_startNamespaceDeclHandler = NULL;
 1121|  16.6k|  parser->m_endNamespaceDeclHandler = NULL;
 1122|  16.6k|  parser->m_notStandaloneHandler = NULL;
 1123|  16.6k|  parser->m_externalEntityRefHandler = NULL;
 1124|  16.6k|  parser->m_externalEntityRefHandlerArg = parser;
 1125|  16.6k|  parser->m_skippedEntityHandler = NULL;
 1126|  16.6k|  parser->m_elementDeclHandler = NULL;
 1127|  16.6k|  parser->m_attlistDeclHandler = NULL;
 1128|  16.6k|  parser->m_entityDeclHandler = NULL;
 1129|  16.6k|  parser->m_xmlDeclHandler = NULL;
 1130|  16.6k|  parser->m_bufferPtr = parser->m_buffer;
 1131|  16.6k|  parser->m_bufferEnd = parser->m_buffer;
 1132|  16.6k|  parser->m_parseEndByteIndex = 0;
 1133|  16.6k|  parser->m_parseEndPtr = NULL;
 1134|  16.6k|  parser->m_declElementType = NULL;
 1135|  16.6k|  parser->m_declAttributeId = NULL;
 1136|  16.6k|  parser->m_declEntity = NULL;
 1137|  16.6k|  parser->m_doctypeName = NULL;
 1138|  16.6k|  parser->m_doctypeSysid = NULL;
 1139|  16.6k|  parser->m_doctypePubid = NULL;
 1140|  16.6k|  parser->m_declAttributeType = NULL;
 1141|  16.6k|  parser->m_declNotationName = NULL;
 1142|  16.6k|  parser->m_declNotationPublicId = NULL;
 1143|  16.6k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  16.6k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1145|  16.6k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1146|  16.6k|  parser->m_errorCode = XML_ERROR_NONE;
 1147|  16.6k|  parser->m_eventPtr = NULL;
 1148|  16.6k|  parser->m_eventEndPtr = NULL;
 1149|  16.6k|  parser->m_positionPtr = NULL;
 1150|  16.6k|  parser->m_openInternalEntities = NULL;
 1151|  16.6k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  16.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1152|  16.6k|  parser->m_tagLevel = 0;
 1153|  16.6k|  parser->m_tagStack = NULL;
 1154|  16.6k|  parser->m_inheritedBindings = NULL;
 1155|  16.6k|  parser->m_nSpecifiedAtts = 0;
 1156|  16.6k|  parser->m_unknownEncodingMem = NULL;
 1157|  16.6k|  parser->m_unknownEncodingRelease = NULL;
 1158|  16.6k|  parser->m_unknownEncodingData = NULL;
 1159|  16.6k|  parser->m_parentParser = NULL;
 1160|  16.6k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1161|  16.6k|#ifdef XML_DTD
 1162|  16.6k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  16.6k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  16.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1164|  16.6k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1165|  16.6k|#endif
 1166|  16.6k|  parser->m_hash_secret_salt = 0;
 1167|       |
 1168|  16.6k|#ifdef XML_DTD
 1169|  16.6k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1170|  16.6k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1171|  16.6k|  parser->m_accounting.maximumAmplificationFactor
 1172|  16.6k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  16.6k|  100.0f
  ------------------
 1173|  16.6k|  parser->m_accounting.activationThresholdBytes
 1174|  16.6k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  16.6k|  8388608 // 8 MiB, 2^23
  ------------------
 1175|       |
 1176|  16.6k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1177|  16.6k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1178|  16.6k|#endif
 1179|  16.6k|}
xmlparse.c:prologInitProcessor:
 4406|  16.6k|                    const char **nextPtr) {
 4407|  16.6k|  enum XML_Error result = initializeEncoding(parser);
 4408|  16.6k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4408:7): [True: 0, False: 16.6k]
  ------------------
 4409|      0|    return result;
 4410|  16.6k|  parser->m_processor = prologProcessor;
 4411|  16.6k|  return prologProcessor(parser, s, end, nextPtr);
 4412|  16.6k|}
xmlparse.c:initializeEncoding:
 4249|  16.6k|initializeEncoding(XML_Parser parser) {
 4250|  16.6k|  const char *s;
 4251|       |#ifdef XML_UNICODE
 4252|       |  char encodingBuf[128];
 4253|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4254|       |  if (! parser->m_protocolEncodingName)
 4255|       |    s = NULL;
 4256|       |  else {
 4257|       |    int i;
 4258|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4259|       |      if (i == sizeof(encodingBuf) - 1
 4260|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4261|       |        encodingBuf[0] = '\0';
 4262|       |        break;
 4263|       |      }
 4264|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4265|       |    }
 4266|       |    encodingBuf[i] = '\0';
 4267|       |    s = encodingBuf;
 4268|       |  }
 4269|       |#else
 4270|  16.6k|  s = parser->m_protocolEncodingName;
 4271|  16.6k|#endif
 4272|  16.6k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4272:7): [True: 16.6k, False: 0]
  |  Branch (4272:8): [True: 0, False: 16.6k]
  ------------------
 4273|  16.6k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4274|  16.6k|    return XML_ERROR_NONE;
 4275|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4276|  16.6k|}
xmlparse.c:prologProcessor:
 4606|  16.6k|                const char **nextPtr) {
 4607|  16.6k|  const char *next = s;
 4608|  16.6k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  16.6k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  16.6k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4609|  16.6k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4610|  16.6k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  16.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4611|  16.6k|                  XML_ACCOUNT_DIRECT);
 4612|  16.6k|}
xmlparse.c:doProlog:
 4617|  16.6k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4618|  16.6k|#ifdef XML_DTD
 4619|  16.6k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  16.6k|#define ASCII_HASH 0x23
  ------------------
 4620|  16.6k|#endif /* XML_DTD */
 4621|  16.6k|  static const XML_Char atypeCDATA[]
 4622|  16.6k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  16.6k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  16.6k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  16.6k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  16.6k|#define ASCII_A 0x41
  ------------------
 4623|  16.6k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  16.6k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  16.6k|#define ASCII_D 0x44
  ------------------
 4624|  16.6k|  static const XML_Char atypeIDREF[]
 4625|  16.6k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  16.6k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  16.6k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  16.6k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  16.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  16.6k|#define ASCII_F 0x46
  ------------------
 4626|  16.6k|  static const XML_Char atypeIDREFS[]
 4627|  16.6k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  16.6k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  16.6k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  16.6k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  16.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  16.6k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  16.6k|#define ASCII_S 0x53
  ------------------
 4628|  16.6k|  static const XML_Char atypeENTITY[]
 4629|  16.6k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  16.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  16.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  16.6k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  16.6k|#define ASCII_Y 0x59
  ------------------
 4630|  16.6k|  static const XML_Char atypeENTITIES[]
 4631|  16.6k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  16.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  16.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  16.6k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
 4632|  16.6k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  16.6k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  16.6k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  16.6k|#define ASCII_S 0x53
  ------------------
 4633|  16.6k|  static const XML_Char atypeNMTOKEN[]
 4634|  16.6k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  16.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  16.6k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  16.6k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  16.6k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  16.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  16.6k|#define ASCII_N 0x4E
  ------------------
 4635|  16.6k|  static const XML_Char atypeNMTOKENS[]
 4636|  16.6k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  16.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  16.6k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  16.6k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  16.6k|#define ASCII_K 0x4B
  ------------------
 4637|  16.6k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  16.6k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  16.6k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  16.6k|#define ASCII_S 0x53
  ------------------
 4638|  16.6k|  static const XML_Char notationPrefix[]
 4639|  16.6k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  16.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  16.6k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  16.6k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  16.6k|#define ASCII_T 0x54
  ------------------
 4640|  16.6k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  16.6k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  16.6k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  16.6k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  16.6k|#define ASCII_LPAREN 0x28
  ------------------
 4641|  16.6k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  16.6k|#define ASCII_PIPE 0x7C
  ------------------
 4642|  16.6k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  16.6k|#define ASCII_LPAREN 0x28
  ------------------
 4643|       |
 4644|       |#ifndef XML_DTD
 4645|       |  UNUSED_P(account);
 4646|       |#endif
 4647|       |
 4648|       |  /* save one level of indirection */
 4649|  16.6k|  DTD *const dtd = parser->m_dtd;
 4650|       |
 4651|  16.6k|  const char **eventPP;
 4652|  16.6k|  const char **eventEndPP;
 4653|  16.6k|  enum XML_Content_Quant quant;
 4654|       |
 4655|  16.6k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4655:7): [True: 16.6k, False: 0]
  ------------------
 4656|  16.6k|    eventPP = &parser->m_eventPtr;
 4657|  16.6k|    eventEndPP = &parser->m_eventEndPtr;
 4658|  16.6k|  } else {
 4659|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4660|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4661|      0|  }
 4662|       |
 4663|  3.84M|  for (;;) {
 4664|  3.84M|    int role;
 4665|  3.84M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  3.84M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4666|  3.84M|    *eventPP = s;
 4667|  3.84M|    *eventEndPP = next;
 4668|  3.84M|    if (tok <= 0) {
  ------------------
  |  Branch (4668:9): [True: 5.57k, False: 3.84M]
  ------------------
 4669|  5.57k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  5.57k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4669:11): [True: 5.57k, False: 0]
  |  Branch (4669:23): [True: 3.44k, False: 2.12k]
  ------------------
 4670|  3.44k|        *nextPtr = s;
 4671|  3.44k|        return XML_ERROR_NONE;
 4672|  3.44k|      }
 4673|  2.12k|      switch (tok) {
 4674|  2.12k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.12k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4674:7): [True: 2.12k, False: 0]
  ------------------
 4675|  2.12k|        *eventPP = next;
 4676|  2.12k|        return XML_ERROR_INVALID_TOKEN;
 4677|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4677:7): [True: 0, False: 2.12k]
  ------------------
 4678|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4679|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4679:7): [True: 0, False: 2.12k]
  ------------------
 4680|      0|        return XML_ERROR_PARTIAL_CHAR;
 4681|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4681:7): [True: 0, False: 2.12k]
  ------------------
 4682|      0|        tok = -tok;
 4683|      0|        break;
 4684|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4684:7): [True: 0, False: 2.12k]
  ------------------
 4685|      0|#ifdef XML_DTD
 4686|       |        /* for internal PE NOT referenced between declarations */
 4687|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4687:13): [True: 0, False: 0]
  ------------------
 4688|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4688:16): [True: 0, False: 0]
  ------------------
 4689|      0|          *nextPtr = s;
 4690|      0|          return XML_ERROR_NONE;
 4691|      0|        }
 4692|       |        /* WFC: PE Between Declarations - must check that PE contains
 4693|       |           complete markup, not only for external PEs, but also for
 4694|       |           internal PEs if the reference occurs between declarations.
 4695|       |        */
 4696|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4696:13): [True: 0, False: 0]
  |  Branch (4696:40): [True: 0, False: 0]
  ------------------
 4697|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4697:15): [True: 0, False: 0]
  ------------------
 4698|      0|              == XML_ROLE_ERROR)
 4699|      0|            return XML_ERROR_INCOMPLETE_PE;
 4700|      0|          *nextPtr = s;
 4701|      0|          return XML_ERROR_NONE;
 4702|      0|        }
 4703|      0|#endif /* XML_DTD */
 4704|      0|        return XML_ERROR_NO_ELEMENTS;
 4705|      0|      default:
  ------------------
  |  Branch (4705:7): [True: 0, False: 2.12k]
  ------------------
 4706|      0|        tok = -tok;
 4707|      0|        next = end;
 4708|      0|        break;
 4709|  2.12k|      }
 4710|  2.12k|    }
 4711|  3.84M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  3.84M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4712|  3.84M|#ifdef XML_DTD
 4713|  3.84M|    switch (role) {
 4714|  9.59k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4714:5): [True: 9.59k, False: 3.83M]
  ------------------
 4715|  9.86k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 278, False: 3.84M]
  ------------------
 4716|  9.86k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4716:5): [True: 0, False: 3.84M]
  ------------------
 4717|  9.86k|      break;
 4718|  3.83M|    default:
  ------------------
  |  Branch (4718:5): [True: 3.83M, False: 9.86k]
  ------------------
 4719|  3.83M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4719:11): [True: 0, False: 3.83M]
  ------------------
 4720|      0|        accountingOnAbort(parser);
 4721|      0|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4722|      0|      }
 4723|  3.84M|    }
 4724|  3.84M|#endif
 4725|  3.84M|    switch (role) {
  ------------------
  |  Branch (4725:13): [True: 0, False: 3.84M]
  ------------------
 4726|    278|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4726:5): [True: 278, False: 3.84M]
  ------------------
 4727|    278|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4728|    278|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4728:11): [True: 216, False: 62]
  ------------------
 4729|    216|        return result;
 4730|     62|      enc = parser->m_encoding;
 4731|     62|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     62|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4732|     62|    } break;
 4733|  4.90k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4733:5): [True: 4.90k, False: 3.83M]
  ------------------
 4734|  4.90k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4734:11): [True: 0, False: 4.90k]
  ------------------
 4735|      0|        parser->m_doctypeName
 4736|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4737|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4737:13): [True: 0, False: 0]
  ------------------
 4738|      0|          return XML_ERROR_NO_MEMORY;
 4739|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4740|      0|        parser->m_doctypePubid = NULL;
 4741|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4742|      0|      }
 4743|  4.90k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4744|  4.90k|      break;
 4745|  4.15k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4745:5): [True: 4.15k, False: 3.83M]
  ------------------
 4746|  4.15k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4746:11): [True: 0, False: 4.15k]
  ------------------
 4747|      0|        parser->m_startDoctypeDeclHandler(
 4748|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4749|      0|            parser->m_doctypePubid, 1);
 4750|      0|        parser->m_doctypeName = NULL;
 4751|      0|        poolClear(&parser->m_tempPool);
 4752|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4753|      0|      }
 4754|  4.15k|      break;
 4755|      0|#ifdef XML_DTD
 4756|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4756:5): [True: 0, False: 3.84M]
  ------------------
 4757|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4758|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4758:11): [True: 0, False: 0]
  ------------------
 4759|      0|        return result;
 4760|      0|      enc = parser->m_encoding;
 4761|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4762|      0|    } break;
 4763|      0|#endif /* XML_DTD */
 4764|    657|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4764:5): [True: 657, False: 3.84M]
  ------------------
 4765|    657|#ifdef XML_DTD
 4766|    657|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    657|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4767|    657|      parser->m_declEntity = (ENTITY *)lookup(
 4768|    657|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4769|    657|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4769:11): [True: 0, False: 657]
  ------------------
 4770|      0|        return XML_ERROR_NO_MEMORY;
 4771|    657|#endif /* XML_DTD */
 4772|    657|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    657|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4773|    657|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4773:11): [True: 0, False: 657]
  ------------------
 4774|      0|        XML_Char *pubId;
 4775|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4775:13): [True: 0, False: 0]
  ------------------
 4776|      0|          return XML_ERROR_PUBLICID;
 4777|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4778|      0|                                s + enc->minBytesPerChar,
 4779|      0|                                next - enc->minBytesPerChar);
 4780|      0|        if (! pubId)
  ------------------
  |  Branch (4780:13): [True: 0, False: 0]
  ------------------
 4781|      0|          return XML_ERROR_NO_MEMORY;
 4782|      0|        normalizePublicId(pubId);
 4783|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4784|      0|        parser->m_doctypePubid = pubId;
 4785|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4786|      0|        goto alreadyChecked;
 4787|      0|      }
 4788|       |      /* fall through */
 4789|  2.77k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4789:5): [True: 2.11k, False: 3.84M]
  ------------------
 4790|  2.77k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  2.77k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4790:11): [True: 133, False: 2.64k]
  ------------------
 4791|    133|        return XML_ERROR_PUBLICID;
 4792|  2.64k|    alreadyChecked:
 4793|  2.64k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4793:11): [True: 2.60k, False: 36]
  |  Branch (4793:34): [True: 880, False: 1.72k]
  ------------------
 4794|    880|        XML_Char *tem
 4795|    880|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4796|    880|                              next - enc->minBytesPerChar);
 4797|    880|        if (! tem)
  ------------------
  |  Branch (4797:13): [True: 0, False: 880]
  ------------------
 4798|      0|          return XML_ERROR_NO_MEMORY;
 4799|    880|        normalizePublicId(tem);
 4800|    880|        parser->m_declEntity->publicId = tem;
 4801|    880|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    880|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4802|       |        /* Don't suppress the default handler if we fell through from
 4803|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4804|       |         */
 4805|    880|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4805:13): [True: 0, False: 880]
  |  Branch (4805:44): [True: 0, False: 0]
  ------------------
 4806|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4807|    880|      }
 4808|  2.64k|      break;
 4809|  2.64k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4809:5): [True: 1.88k, False: 3.84M]
  ------------------
 4810|  1.88k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  1.88k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4810:11): [True: 0, False: 1.88k]
  ------------------
 4811|       |        /* Must not close doctype from within expanded parameter entities */
 4812|      0|        return XML_ERROR_INVALID_TOKEN;
 4813|      0|      }
 4814|       |
 4815|  1.88k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4815:11): [True: 0, False: 1.88k]
  ------------------
 4816|      0|        parser->m_startDoctypeDeclHandler(
 4817|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4818|      0|            parser->m_doctypePubid, 0);
 4819|      0|        poolClear(&parser->m_tempPool);
 4820|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4821|      0|      }
 4822|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4823|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4824|       |         was not set, indicating an external subset
 4825|       |      */
 4826|  1.88k|#ifdef XML_DTD
 4827|  1.88k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4827:11): [True: 12, False: 1.87k]
  |  Branch (4827:37): [True: 0, False: 1.87k]
  ------------------
 4828|     12|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4829|     12|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     12|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4830|     12|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4830:13): [True: 0, False: 12]
  ------------------
 4831|     12|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4831:16): [True: 0, False: 0]
  ------------------
 4832|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4833|      0|                                            externalSubsetName, sizeof(ENTITY));
 4834|      0|          if (! entity) {
  ------------------
  |  Branch (4834:15): [True: 0, False: 0]
  ------------------
 4835|       |            /* The external subset name "#" will have already been
 4836|       |             * inserted into the hash table at the start of the
 4837|       |             * external entity parsing, so no allocation will happen
 4838|       |             * and lookup() cannot fail.
 4839|       |             */
 4840|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4841|      0|          }
 4842|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4842:15): [True: 0, False: 0]
  ------------------
 4843|      0|            entity->base = parser->m_curBase;
 4844|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4845|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4845:15): [True: 0, False: 0]
  ------------------
 4846|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4847|      0|                  entity->systemId, entity->publicId))
 4848|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4849|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4849:15): [True: 0, False: 0]
  ------------------
 4850|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4850:17): [True: 0, False: 0]
  |  Branch (4850:38): [True: 0, False: 0]
  ------------------
 4851|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4851:20): [True: 0, False: 0]
  ------------------
 4852|      0|              return XML_ERROR_NOT_STANDALONE;
 4853|      0|          }
 4854|       |          /* if we didn't read the foreign DTD then this means that there
 4855|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4856|       |          */
 4857|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4857:20): [True: 0, False: 0]
  ------------------
 4858|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4859|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4860|      0|        }
 4861|     12|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     12|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4862|     12|      }
 4863|  1.88k|#endif /* XML_DTD */
 4864|  1.88k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4864:11): [True: 0, False: 1.88k]
  ------------------
 4865|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4866|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4867|      0|      }
 4868|  1.88k|      break;
 4869|  9.59k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4869:5): [True: 9.59k, False: 3.83M]
  ------------------
 4870|  9.59k|#ifdef XML_DTD
 4871|       |      /* if there is no DOCTYPE declaration then now is the
 4872|       |         last chance to read the foreign DTD
 4873|       |      */
 4874|  9.59k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4874:11): [True: 0, False: 9.59k]
  ------------------
 4875|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4876|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4877|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4877:13): [True: 0, False: 0]
  ------------------
 4878|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4878:16): [True: 0, False: 0]
  ------------------
 4879|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4880|      0|                                            externalSubsetName, sizeof(ENTITY));
 4881|      0|          if (! entity)
  ------------------
  |  Branch (4881:15): [True: 0, False: 0]
  ------------------
 4882|      0|            return XML_ERROR_NO_MEMORY;
 4883|      0|          entity->base = parser->m_curBase;
 4884|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4885|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4885:15): [True: 0, False: 0]
  ------------------
 4886|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4887|      0|                  entity->systemId, entity->publicId))
 4888|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4889|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4889:15): [True: 0, False: 0]
  ------------------
 4890|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4890:17): [True: 0, False: 0]
  |  Branch (4890:38): [True: 0, False: 0]
  ------------------
 4891|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4891:20): [True: 0, False: 0]
  ------------------
 4892|      0|              return XML_ERROR_NOT_STANDALONE;
 4893|      0|          }
 4894|       |          /* if we didn't read the foreign DTD then this means that there
 4895|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4896|       |          */
 4897|      0|          else
 4898|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4899|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4900|      0|        }
 4901|      0|      }
 4902|  9.59k|#endif /* XML_DTD */
 4903|  9.59k|      parser->m_processor = contentProcessor;
 4904|  9.59k|      return contentProcessor(parser, s, end, nextPtr);
 4905|  10.9k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4905:5): [True: 10.9k, False: 3.83M]
  ------------------
 4906|  10.9k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4907|  10.9k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4907:11): [True: 0, False: 10.9k]
  ------------------
 4908|      0|        return XML_ERROR_NO_MEMORY;
 4909|  10.9k|      goto checkAttListDeclHandler;
 4910|  63.7k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4910:5): [True: 63.7k, False: 3.77M]
  ------------------
 4911|  63.7k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4912|  63.7k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4912:11): [True: 0, False: 63.7k]
  ------------------
 4913|      0|        return XML_ERROR_NO_MEMORY;
 4914|  63.7k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  63.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4915|  63.7k|      parser->m_declAttributeType = NULL;
 4916|  63.7k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  63.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4917|  63.7k|      goto checkAttListDeclHandler;
 4918|    220|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4918:5): [True: 220, False: 3.84M]
  ------------------
 4919|    220|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    220|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4920|    220|      parser->m_declAttributeType = atypeCDATA;
 4921|    220|      goto checkAttListDeclHandler;
 4922|  6.09k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4922:5): [True: 6.09k, False: 3.83M]
  ------------------
 4923|  6.09k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  6.09k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4924|  6.09k|      parser->m_declAttributeType = atypeID;
 4925|  6.09k|      goto checkAttListDeclHandler;
 4926|    257|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4926:5): [True: 257, False: 3.84M]
  ------------------
 4927|    257|      parser->m_declAttributeType = atypeIDREF;
 4928|    257|      goto checkAttListDeclHandler;
 4929|    125|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4929:5): [True: 125, False: 3.84M]
  ------------------
 4930|    125|      parser->m_declAttributeType = atypeIDREFS;
 4931|    125|      goto checkAttListDeclHandler;
 4932|    348|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4932:5): [True: 348, False: 3.84M]
  ------------------
 4933|    348|      parser->m_declAttributeType = atypeENTITY;
 4934|    348|      goto checkAttListDeclHandler;
 4935|  1.84k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4935:5): [True: 1.84k, False: 3.84M]
  ------------------
 4936|  1.84k|      parser->m_declAttributeType = atypeENTITIES;
 4937|  1.84k|      goto checkAttListDeclHandler;
 4938|    331|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4938:5): [True: 331, False: 3.84M]
  ------------------
 4939|    331|      parser->m_declAttributeType = atypeNMTOKEN;
 4940|    331|      goto checkAttListDeclHandler;
 4941|    339|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4941:5): [True: 339, False: 3.84M]
  ------------------
 4942|    339|      parser->m_declAttributeType = atypeNMTOKENS;
 4943|  84.3k|    checkAttListDeclHandler:
 4944|  84.3k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4944:11): [True: 84.0k, False: 314]
  |  Branch (4944:34): [True: 0, False: 84.0k]
  ------------------
 4945|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4946|  84.3k|      break;
 4947|  71.6k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4947:5): [True: 71.6k, False: 3.77M]
  ------------------
 4948|  72.9k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4948:5): [True: 1.32k, False: 3.84M]
  ------------------
 4949|  72.9k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4949:11): [True: 72.5k, False: 402]
  |  Branch (4949:34): [True: 0, False: 72.5k]
  ------------------
 4950|      0|        const XML_Char *prefix;
 4951|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4951:13): [True: 0, False: 0]
  ------------------
 4952|      0|          prefix = enumValueSep;
 4953|      0|        } else {
 4954|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4954:21): [True: 0, False: 0]
  ------------------
 4955|      0|                                                              : enumValueStart);
 4956|      0|        }
 4957|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4957:13): [True: 0, False: 0]
  ------------------
 4958|      0|          return XML_ERROR_NO_MEMORY;
 4959|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4959:13): [True: 0, False: 0]
  ------------------
 4960|      0|          return XML_ERROR_NO_MEMORY;
 4961|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4962|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4963|      0|      }
 4964|  72.9k|      break;
 4965|  72.9k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 52.5k, False: 3.79M]
  ------------------
 4966|  55.1k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4966:5): [True: 2.53k, False: 3.84M]
  ------------------
 4967|  55.1k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4967:11): [True: 54.9k, False: 194]
  ------------------
 4968|  54.9k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4968:13): [True: 0, False: 54.9k]
  ------------------
 4969|  54.9k|                              parser->m_declAttributeId,
 4970|  54.9k|                              parser->m_declAttributeIsCdata,
 4971|  54.9k|                              parser->m_declAttributeIsId, 0, parser))
 4972|      0|          return XML_ERROR_NO_MEMORY;
 4973|  54.9k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4973:13): [True: 0, False: 54.9k]
  |  Branch (4973:45): [True: 0, False: 0]
  ------------------
 4974|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:15): [True: 0, False: 0]
  ------------------
 4975|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:19): [True: 0, False: 0]
  ------------------
 4976|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4976:22): [True: 0, False: 0]
  ------------------
 4977|       |            /* Enumerated or Notation type */
 4978|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:17): [True: 0, False: 0]
  ------------------
 4979|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4979:20): [True: 0, False: 0]
  ------------------
 4980|      0|              return XML_ERROR_NO_MEMORY;
 4981|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4982|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4983|      0|          }
 4984|      0|          *eventEndPP = s;
 4985|      0|          parser->m_attlistDeclHandler(
 4986|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4987|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4988|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4989|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4990|      0|        }
 4991|  54.9k|      }
 4992|  55.1k|      poolClear(&parser->m_tempPool);
 4993|  55.1k|      break;
 4994|  7.12k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 7.12k, False: 3.83M]
  ------------------
 4995|  8.19k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4995:5): [True: 1.06k, False: 3.84M]
  ------------------
 4996|  8.19k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4996:11): [True: 8.12k, False: 66]
  ------------------
 4997|  8.12k|        const XML_Char *attVal;
 4998|  8.12k|        enum XML_Error result = storeAttributeValue(
 4999|  8.12k|            parser, enc, parser->m_declAttributeIsCdata,
 5000|  8.12k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5001|  8.12k|            XML_ACCOUNT_NONE);
 5002|  8.12k|        if (result)
  ------------------
  |  Branch (5002:13): [True: 29, False: 8.09k]
  ------------------
 5003|     29|          return result;
 5004|  8.09k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  596|  8.09k|#define poolStart(pool) ((pool)->start)
  ------------------
 5005|  8.09k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  8.09k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5006|       |        /* ID attributes aren't allowed to have a default */
 5007|  8.09k|        if (! defineAttribute(
  ------------------
  |  Branch (5007:13): [True: 0, False: 8.09k]
  ------------------
 5008|  8.09k|                parser->m_declElementType, parser->m_declAttributeId,
 5009|  8.09k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  8.09k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5010|      0|          return XML_ERROR_NO_MEMORY;
 5011|  8.09k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5011:13): [True: 0, False: 8.09k]
  |  Branch (5011:45): [True: 0, False: 0]
  ------------------
 5012|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:15): [True: 0, False: 0]
  ------------------
 5013|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:19): [True: 0, False: 0]
  ------------------
 5014|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5014:22): [True: 0, False: 0]
  ------------------
 5015|       |            /* Enumerated or Notation type */
 5016|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:17): [True: 0, False: 0]
  ------------------
 5017|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5017:20): [True: 0, False: 0]
  ------------------
 5018|      0|              return XML_ERROR_NO_MEMORY;
 5019|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5020|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5021|      0|          }
 5022|      0|          *eventEndPP = s;
 5023|      0|          parser->m_attlistDeclHandler(
 5024|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5025|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5026|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5027|      0|          poolClear(&parser->m_tempPool);
 5028|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5029|      0|        }
 5030|  8.09k|      }
 5031|  8.16k|      break;
 5032|  8.16k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5032:5): [True: 6.24k, False: 3.83M]
  ------------------
 5033|  6.24k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5033:11): [True: 5.89k, False: 352]
  ------------------
 5034|  5.89k|        enum XML_Error result
 5035|  5.89k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5036|  5.89k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5037|  5.89k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5037:13): [True: 2.79k, False: 3.10k]
  ------------------
 5038|  2.79k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  596|  2.79k|#define poolStart(pool) ((pool)->start)
  ------------------
 5039|  2.79k|          parser->m_declEntity->textLen
 5040|  2.79k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  597|  2.79k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5041|  2.79k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  601|  2.79k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5042|  2.79k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5042:15): [True: 0, False: 2.79k]
  ------------------
 5043|      0|            *eventEndPP = s;
 5044|      0|            parser->m_entityDeclHandler(
 5045|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5046|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5047|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5048|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5049|      0|          }
 5050|  2.79k|        } else
 5051|  3.10k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  600|  3.10k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5052|  5.89k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5052:13): [True: 65, False: 5.83k]
  ------------------
 5053|     65|          return result;
 5054|  5.89k|      }
 5055|  6.18k|      break;
 5056|  6.18k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5056:5): [True: 41, False: 3.84M]
  ------------------
 5057|     41|#ifdef XML_DTD
 5058|     41|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     41|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5059|     41|#endif /* XML_DTD */
 5060|     41|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     41|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5061|     41|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5061:11): [True: 0, False: 41]
  ------------------
 5062|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5063|      0|                                                 s + enc->minBytesPerChar,
 5064|      0|                                                 next - enc->minBytesPerChar);
 5065|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5065:13): [True: 0, False: 0]
  ------------------
 5066|      0|          return XML_ERROR_NO_MEMORY;
 5067|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5068|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5069|      0|      }
 5070|     41|#ifdef XML_DTD
 5071|     41|      else
 5072|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5073|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5074|     41|        parser->m_doctypeSysid = externalSubsetName;
 5075|     41|#endif /* XML_DTD */
 5076|     41|      if (! dtd->standalone
  ------------------
  |  Branch (5076:11): [True: 40, False: 1]
  ------------------
 5077|     41|#ifdef XML_DTD
 5078|     41|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5078:14): [True: 40, False: 0]
  ------------------
 5079|     41|#endif /* XML_DTD */
 5080|     41|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5080:14): [True: 0, False: 40]
  ------------------
 5081|     41|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5081:14): [True: 0, False: 0]
  ------------------
 5082|      0|        return XML_ERROR_NOT_STANDALONE;
 5083|       |#ifndef XML_DTD
 5084|       |      break;
 5085|       |#else  /* XML_DTD */
 5086|     41|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5086:11): [True: 5, False: 36]
  ------------------
 5087|      5|        parser->m_declEntity = (ENTITY *)lookup(
 5088|      5|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5089|      5|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5089:13): [True: 0, False: 5]
  ------------------
 5090|      0|          return XML_ERROR_NO_MEMORY;
 5091|      5|        parser->m_declEntity->publicId = NULL;
 5092|      5|      }
 5093|     41|#endif /* XML_DTD */
 5094|       |      /* fall through */
 5095|  2.55k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5095:5): [True: 2.51k, False: 3.84M]
  ------------------
 5096|  2.55k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5096:11): [True: 2.44k, False: 106]
  |  Branch (5096:34): [True: 476, False: 1.97k]
  ------------------
 5097|    476|        parser->m_declEntity->systemId
 5098|    476|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5099|    476|                              next - enc->minBytesPerChar);
 5100|    476|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5100:13): [True: 0, False: 476]
  ------------------
 5101|      0|          return XML_ERROR_NO_MEMORY;
 5102|    476|        parser->m_declEntity->base = parser->m_curBase;
 5103|    476|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    476|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5104|       |        /* Don't suppress the default handler if we fell through from
 5105|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5106|       |         */
 5107|    476|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5107:13): [True: 0, False: 476]
  |  Branch (5107:44): [True: 0, False: 0]
  ------------------
 5108|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5109|    476|      }
 5110|  2.55k|      break;
 5111|  2.55k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5111:5): [True: 2.31k, False: 3.84M]
  ------------------
 5112|  2.31k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5112:11): [True: 2.22k, False: 86]
  |  Branch (5112:34): [True: 390, False: 1.83k]
  ------------------
 5113|  2.31k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5113:14): [True: 0, False: 390]
  ------------------
 5114|      0|        *eventEndPP = s;
 5115|      0|        parser->m_entityDeclHandler(
 5116|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5117|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5118|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5119|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5120|      0|      }
 5121|  2.31k|      break;
 5122|    182|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5122:5): [True: 182, False: 3.84M]
  ------------------
 5123|    182|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5123:11): [True: 162, False: 20]
  |  Branch (5123:34): [True: 35, False: 127]
  ------------------
 5124|     35|        parser->m_declEntity->notation
 5125|     35|            = poolStoreString(&dtd->pool, enc, s, next);
 5126|     35|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5126:13): [True: 0, False: 35]
  ------------------
 5127|      0|          return XML_ERROR_NO_MEMORY;
 5128|     35|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|     35|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5129|     35|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5129:13): [True: 0, False: 35]
  ------------------
 5130|      0|          *eventEndPP = s;
 5131|      0|          parser->m_unparsedEntityDeclHandler(
 5132|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5133|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5134|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5135|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5136|     35|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5136:20): [True: 0, False: 35]
  ------------------
 5137|      0|          *eventEndPP = s;
 5138|      0|          parser->m_entityDeclHandler(
 5139|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5140|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5141|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5142|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5143|      0|        }
 5144|     35|      }
 5145|    182|      break;
 5146|  5.91k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5146:5): [True: 5.91k, False: 3.83M]
  ------------------
 5147|  5.91k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  5.91k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 372, False: 5.54k]
  |  |  ------------------
  ------------------
 5148|    372|        parser->m_declEntity = NULL;
 5149|    372|        break;
 5150|    372|      }
 5151|  5.54k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5151:11): [True: 5.36k, False: 186]
  ------------------
 5152|  5.36k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5153|  5.36k|        if (! name)
  ------------------
  |  Branch (5153:13): [True: 0, False: 5.36k]
  ------------------
 5154|      0|          return XML_ERROR_NO_MEMORY;
 5155|  5.36k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5156|  5.36k|                                                name, sizeof(ENTITY));
 5157|  5.36k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5157:13): [True: 0, False: 5.36k]
  ------------------
 5158|      0|          return XML_ERROR_NO_MEMORY;
 5159|  5.36k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5159:13): [True: 2.39k, False: 2.96k]
  ------------------
 5160|  2.39k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.39k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5161|  2.39k|          parser->m_declEntity = NULL;
 5162|  2.96k|        } else {
 5163|  2.96k|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|  2.96k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5164|  2.96k|          parser->m_declEntity->publicId = NULL;
 5165|  2.96k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  2.96k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5166|       |          /* if we have a parent parser or are reading an internal parameter
 5167|       |             entity, then the entity declaration is not considered "internal"
 5168|       |          */
 5169|  2.96k|          parser->m_declEntity->is_internal
 5170|  2.96k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5170:20): [True: 0, False: 2.96k]
  |  Branch (5170:46): [True: 0, False: 2.96k]
  ------------------
 5171|  2.96k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5171:15): [True: 0, False: 2.96k]
  ------------------
 5172|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5173|  2.96k|        }
 5174|  5.36k|      } else {
 5175|    186|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    186|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5176|    186|        parser->m_declEntity = NULL;
 5177|    186|      }
 5178|  5.54k|    } break;
 5179|  5.54k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5179:5): [True: 3.01k, False: 3.84M]
  ------------------
 5180|  3.01k|#ifdef XML_DTD
 5181|  3.01k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5181:11): [True: 2.72k, False: 292]
  ------------------
 5182|  2.72k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5183|  2.72k|        if (! name)
  ------------------
  |  Branch (5183:13): [True: 0, False: 2.72k]
  ------------------
 5184|      0|          return XML_ERROR_NO_MEMORY;
 5185|  2.72k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5186|  2.72k|                                                name, sizeof(ENTITY));
 5187|  2.72k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5187:13): [True: 0, False: 2.72k]
  ------------------
 5188|      0|          return XML_ERROR_NO_MEMORY;
 5189|  2.72k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5189:13): [True: 2.36k, False: 363]
  ------------------
 5190|  2.36k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.36k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5191|  2.36k|          parser->m_declEntity = NULL;
 5192|  2.36k|        } else {
 5193|    363|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|    363|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5194|    363|          parser->m_declEntity->publicId = NULL;
 5195|    363|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    363|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5196|       |          /* if we have a parent parser or are reading an internal parameter
 5197|       |             entity, then the entity declaration is not considered "internal"
 5198|       |          */
 5199|    363|          parser->m_declEntity->is_internal
 5200|    363|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5200:20): [True: 0, False: 363]
  |  Branch (5200:46): [True: 0, False: 363]
  ------------------
 5201|    363|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5201:15): [True: 0, False: 363]
  ------------------
 5202|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5203|    363|        }
 5204|  2.72k|      } else {
 5205|    292|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    292|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5206|    292|        parser->m_declEntity = NULL;
 5207|    292|      }
 5208|       |#else  /* not XML_DTD */
 5209|       |      parser->m_declEntity = NULL;
 5210|       |#endif /* XML_DTD */
 5211|  3.01k|      break;
 5212|  3.01k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5212:5): [True: 668, False: 3.84M]
  ------------------
 5213|    668|      parser->m_declNotationPublicId = NULL;
 5214|    668|      parser->m_declNotationName = NULL;
 5215|    668|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5215:11): [True: 0, False: 668]
  ------------------
 5216|      0|        parser->m_declNotationName
 5217|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5218|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5218:13): [True: 0, False: 0]
  ------------------
 5219|      0|          return XML_ERROR_NO_MEMORY;
 5220|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5221|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5222|      0|      }
 5223|    668|      break;
 5224|    668|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5224:5): [True: 374, False: 3.84M]
  ------------------
 5225|    374|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|    374|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5225:11): [True: 1, False: 373]
  ------------------
 5226|      1|        return XML_ERROR_PUBLICID;
 5227|    373|      if (parser
  ------------------
  |  Branch (5227:11): [True: 0, False: 373]
  ------------------
 5228|    373|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5229|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5230|      0|                                        s + enc->minBytesPerChar,
 5231|      0|                                        next - enc->minBytesPerChar);
 5232|      0|        if (! tem)
  ------------------
  |  Branch (5232:13): [True: 0, False: 0]
  ------------------
 5233|      0|          return XML_ERROR_NO_MEMORY;
 5234|      0|        normalizePublicId(tem);
 5235|      0|        parser->m_declNotationPublicId = tem;
 5236|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5237|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5238|      0|      }
 5239|    373|      break;
 5240|    377|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5240:5): [True: 377, False: 3.84M]
  ------------------
 5241|    377|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5241:11): [True: 0, False: 377]
  |  Branch (5241:41): [True: 0, False: 0]
  ------------------
 5242|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5243|      0|                                                   s + enc->minBytesPerChar,
 5244|      0|                                                   next - enc->minBytesPerChar);
 5245|      0|        if (! systemId)
  ------------------
  |  Branch (5245:13): [True: 0, False: 0]
  ------------------
 5246|      0|          return XML_ERROR_NO_MEMORY;
 5247|      0|        *eventEndPP = s;
 5248|      0|        parser->m_notationDeclHandler(
 5249|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5250|      0|            systemId, parser->m_declNotationPublicId);
 5251|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5252|      0|      }
 5253|    377|      poolClear(&parser->m_tempPool);
 5254|    377|      break;
 5255|    265|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5255:5): [True: 265, False: 3.84M]
  ------------------
 5256|    265|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5256:11): [True: 0, False: 265]
  |  Branch (5256:45): [True: 0, False: 0]
  ------------------
 5257|      0|        *eventEndPP = s;
 5258|      0|        parser->m_notationDeclHandler(
 5259|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5260|      0|            0, parser->m_declNotationPublicId);
 5261|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5262|      0|      }
 5263|    265|      poolClear(&parser->m_tempPool);
 5264|    265|      break;
 5265|  1.04k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5265:5): [True: 1.04k, False: 3.84M]
  ------------------
 5266|  1.04k|      switch (tok) {
 5267|      5|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      5|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5267:7): [True: 5, False: 1.03k]
  ------------------
 5268|       |        /* PE references in internal subset are
 5269|       |           not allowed within declarations. */
 5270|      5|        return XML_ERROR_PARAM_ENTITY_REF;
 5271|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5271:7): [True: 1, False: 1.04k]
  ------------------
 5272|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5273|  1.03k|      default:
  ------------------
  |  Branch (5273:7): [True: 1.03k, False: 6]
  ------------------
 5274|  1.03k|        return XML_ERROR_SYNTAX;
 5275|  1.04k|      }
 5276|      0|#ifdef XML_DTD
 5277|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5277:5): [True: 0, False: 3.84M]
  ------------------
 5278|      0|      enum XML_Error result;
 5279|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5279:11): [True: 0, False: 0]
  ------------------
 5280|      0|        reportDefault(parser, enc, s, next);
 5281|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5282|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5283|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5283:11): [True: 0, False: 0]
  ------------------
 5284|      0|        return result;
 5285|      0|      else if (! next) {
  ------------------
  |  Branch (5285:16): [True: 0, False: 0]
  ------------------
 5286|      0|        parser->m_processor = ignoreSectionProcessor;
 5287|      0|        return result;
 5288|      0|      }
 5289|      0|    } break;
 5290|      0|#endif /* XML_DTD */
 5291|  2.97M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5291:5): [True: 2.97M, False: 868k]
  ------------------
 5292|  2.97M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5292:11): [True: 835, False: 2.97M]
  ------------------
 5293|    835|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5293:13): [True: 303, False: 532]
  ------------------
 5294|    303|          {
 5295|       |            /* Detect and prevent integer overflow */
 5296|    303|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5296:17): [True: 0, False: 303]
  ------------------
 5297|      0|              return XML_ERROR_NO_MEMORY;
 5298|      0|            }
 5299|       |
 5300|    303|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  715|    303|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5301|    303|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5302|    303|            if (new_connector == NULL) {
  ------------------
  |  Branch (5302:17): [True: 0, False: 303]
  ------------------
 5303|      0|              parser->m_groupSize /= 2;
 5304|      0|              return XML_ERROR_NO_MEMORY;
 5305|      0|            }
 5306|    303|            parser->m_groupConnector = new_connector;
 5307|    303|          }
 5308|       |
 5309|    303|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5309:15): [True: 0, False: 303]
  ------------------
 5310|       |            /* Detect and prevent integer overflow.
 5311|       |             * The preprocessor guard addresses the "always false" warning
 5312|       |             * from -Wtype-limits on platforms where
 5313|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5314|       |#if UINT_MAX >= SIZE_MAX
 5315|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5316|       |              return XML_ERROR_NO_MEMORY;
 5317|       |            }
 5318|       |#endif
 5319|       |
 5320|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5321|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5322|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5322:17): [True: 0, False: 0]
  ------------------
 5323|      0|              return XML_ERROR_NO_MEMORY;
 5324|      0|            dtd->scaffIndex = new_scaff_index;
 5325|      0|          }
 5326|    532|        } else {
 5327|    532|          parser->m_groupConnector
 5328|    532|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  714|    532|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5329|    532|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5329:15): [True: 0, False: 532]
  ------------------
 5330|      0|            parser->m_groupSize = 0;
 5331|      0|            return XML_ERROR_NO_MEMORY;
 5332|      0|          }
 5333|    532|        }
 5334|    835|      }
 5335|  2.97M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5336|  2.97M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5336:11): [True: 0, False: 2.97M]
  ------------------
 5337|      0|        int myindex = nextScaffoldPart(parser);
 5338|      0|        if (myindex < 0)
  ------------------
  |  Branch (5338:13): [True: 0, False: 0]
  ------------------
 5339|      0|          return XML_ERROR_NO_MEMORY;
 5340|      0|        assert(dtd->scaffIndex != NULL);
 5341|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5342|      0|        dtd->scaffLevel++;
 5343|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5344|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5344:13): [True: 0, False: 0]
  ------------------
 5345|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5346|      0|      }
 5347|  2.97M|      break;
 5348|  2.97M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5348:5): [True: 16.5k, False: 3.82M]
  ------------------
 5349|  16.5k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  16.5k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5349:11): [True: 1, False: 16.5k]
  ------------------
 5350|      1|        return XML_ERROR_SYNTAX;
 5351|  16.5k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  16.5k|#define ASCII_COMMA 0x2C
  ------------------
 5352|  16.5k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5352:11): [True: 0, False: 16.5k]
  |  Branch (5352:29): [True: 0, False: 0]
  ------------------
 5353|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5354|  16.5k|      break;
 5355|  6.13k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5355:5): [True: 6.13k, False: 3.83M]
  ------------------
 5356|  6.13k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  6.13k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5356:11): [True: 1, False: 6.13k]
  ------------------
 5357|      1|        return XML_ERROR_SYNTAX;
 5358|  6.13k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5358:11): [True: 0, False: 6.13k]
  ------------------
 5359|  6.13k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|  6.13k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5360:14): [True: 0, False: 0]
  ------------------
 5361|      0|              != XML_CTYPE_MIXED)) {
 5362|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5363|      0|            = XML_CTYPE_CHOICE;
 5364|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5364:13): [True: 0, False: 0]
  ------------------
 5365|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5366|      0|      }
 5367|  6.13k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  6.13k|#define ASCII_PIPE 0x7C
  ------------------
 5368|  6.13k|      break;
 5369|  1.61k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5369:5): [True: 1.61k, False: 3.84M]
  ------------------
 5370|  1.61k|#ifdef XML_DTD
 5371|  1.61k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5371:5): [True: 0, False: 3.84M]
  ------------------
 5372|  1.61k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  1.61k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5373|  1.61k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5373:11): [True: 1.61k, False: 0]
  ------------------
 5374|  1.61k|        dtd->keepProcessing = dtd->standalone;
 5375|      0|      else {
 5376|      0|        const XML_Char *name;
 5377|      0|        ENTITY *entity;
 5378|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5379|      0|                               next - enc->minBytesPerChar);
 5380|      0|        if (! name)
  ------------------
  |  Branch (5380:13): [True: 0, False: 0]
  ------------------
 5381|      0|          return XML_ERROR_NO_MEMORY;
 5382|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5383|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5384|       |        /* first, determine if a check for an existing declaration is needed;
 5385|       |           if yes, check that the entity exists, and that it is internal,
 5386|       |           otherwise call the skipped entity handler
 5387|       |        */
 5388|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5388:13): [True: 0, False: 0]
  ------------------
 5389|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5389:16): [True: 0, False: 0]
  |  Branch (5389:17): [True: 0, False: 0]
  ------------------
 5390|      0|                                : ! dtd->hasParamEntityRefs)) {
 5391|      0|          if (! entity)
  ------------------
  |  Branch (5391:15): [True: 0, False: 0]
  ------------------
 5392|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5393|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5393:20): [True: 0, False: 0]
  ------------------
 5394|       |            /* It's hard to exhaustively search the code to be sure,
 5395|       |             * but there doesn't seem to be a way of executing the
 5396|       |             * following line.  There are two cases:
 5397|       |             *
 5398|       |             * If 'standalone' is false, the DTD must have no
 5399|       |             * parameter entities or we wouldn't have passed the outer
 5400|       |             * 'if' statement.  That means the only entity in the hash
 5401|       |             * table is the external subset name "#" which cannot be
 5402|       |             * given as a parameter entity name in XML syntax, so the
 5403|       |             * lookup must have returned NULL and we don't even reach
 5404|       |             * the test for an internal entity.
 5405|       |             *
 5406|       |             * If 'standalone' is true, it does not seem to be
 5407|       |             * possible to create entities taking this code path that
 5408|       |             * are not internal entities, so fail the test above.
 5409|       |             *
 5410|       |             * Because this analysis is very uncertain, the code is
 5411|       |             * being left in place and merely removed from the
 5412|       |             * coverage test statistics.
 5413|       |             */
 5414|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5415|      0|          }
 5416|      0|        } else if (! entity) {
  ------------------
  |  Branch (5416:20): [True: 0, False: 0]
  ------------------
 5417|      0|          dtd->keepProcessing = dtd->standalone;
 5418|       |          /* cannot report skipped entities in declarations */
 5419|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5419:15): [True: 0, False: 0]
  ------------------
 5420|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5420:18): [True: 0, False: 0]
  ------------------
 5421|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5422|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5423|      0|          }
 5424|      0|          break;
 5425|      0|        }
 5426|      0|        if (entity->open)
  ------------------
  |  Branch (5426:13): [True: 0, False: 0]
  ------------------
 5427|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5428|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5428:13): [True: 0, False: 0]
  ------------------
 5429|      0|          enum XML_Error result;
 5430|      0|          XML_Bool betweenDecl
 5431|      0|              = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
                            = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
  |  Branch (5431:18): [True: 0, False: 0]
  ------------------
 5432|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5433|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5433:15): [True: 0, False: 0]
  ------------------
 5434|      0|            return result;
 5435|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5436|      0|          break;
 5437|      0|        }
 5438|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5438:13): [True: 0, False: 0]
  ------------------
 5439|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5440|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5441|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5442|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5442:15): [True: 0, False: 0]
  ------------------
 5443|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5444|      0|                  entity->systemId, entity->publicId)) {
 5445|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5446|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5447|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5448|      0|          }
 5449|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5450|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5452|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5452:15): [True: 0, False: 0]
  ------------------
 5453|      0|            dtd->keepProcessing = dtd->standalone;
 5454|      0|            break;
 5455|      0|          }
 5456|      0|        } else {
 5457|      0|          dtd->keepProcessing = dtd->standalone;
 5458|      0|          break;
 5459|      0|        }
 5460|      0|      }
 5461|  1.61k|#endif /* XML_DTD */
 5462|  1.61k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5462:11): [True: 1.59k, False: 25]
  |  Branch (5462:32): [True: 0, False: 1.59k]
  ------------------
 5463|  1.61k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5463:14): [True: 0, False: 0]
  ------------------
 5464|      0|        return XML_ERROR_NOT_STANDALONE;
 5465|  1.61k|      break;
 5466|       |
 5467|       |      /* Element declaration stuff */
 5468|       |
 5469|  3.31k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5469:5): [True: 3.31k, False: 3.84M]
  ------------------
 5470|  3.31k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5470:11): [True: 0, False: 3.31k]
  ------------------
 5471|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5472|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5472:13): [True: 0, False: 0]
  ------------------
 5473|      0|          return XML_ERROR_NO_MEMORY;
 5474|      0|        dtd->scaffLevel = 0;
 5475|      0|        dtd->scaffCount = 0;
 5476|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5477|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5478|      0|      }
 5479|  3.31k|      break;
 5480|       |
 5481|  3.31k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5481:5): [True: 10, False: 3.84M]
  ------------------
 5482|     20|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5482:5): [True: 10, False: 3.84M]
  ------------------
 5483|     20|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5483:11): [True: 0, False: 20]
  ------------------
 5484|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5484:13): [True: 0, False: 0]
  ------------------
 5485|      0|          XML_Content *content
 5486|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5487|      0|          if (! content)
  ------------------
  |  Branch (5487:15): [True: 0, False: 0]
  ------------------
 5488|      0|            return XML_ERROR_NO_MEMORY;
 5489|      0|          content->quant = XML_CQUANT_NONE;
 5490|      0|          content->name = NULL;
 5491|      0|          content->numchildren = 0;
 5492|      0|          content->children = NULL;
 5493|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5493:28): [True: 0, False: 0]
  ------------------
 5494|      0|                                                          : XML_CTYPE_EMPTY);
 5495|      0|          *eventEndPP = s;
 5496|      0|          parser->m_elementDeclHandler(
 5497|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5498|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5499|      0|        }
 5500|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5501|      0|      }
 5502|     20|      break;
 5503|       |
 5504|    388|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5504:5): [True: 388, False: 3.84M]
  ------------------
 5505|    388|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5505:11): [True: 0, False: 388]
  ------------------
 5506|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5507|      0|            = XML_CTYPE_MIXED;
 5508|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5508:13): [True: 0, False: 0]
  ------------------
 5509|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5510|      0|      }
 5511|    388|      break;
 5512|       |
 5513|  20.5k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5513:5): [True: 20.5k, False: 3.82M]
  ------------------
 5514|  20.5k|      quant = XML_CQUANT_NONE;
 5515|  20.5k|      goto elementContent;
 5516|    213|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5516:5): [True: 213, False: 3.84M]
  ------------------
 5517|    213|      quant = XML_CQUANT_OPT;
 5518|    213|      goto elementContent;
 5519|  3.60k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5519:5): [True: 3.60k, False: 3.83M]
  ------------------
 5520|  3.60k|      quant = XML_CQUANT_REP;
 5521|  3.60k|      goto elementContent;
 5522|  1.65k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5522:5): [True: 1.65k, False: 3.84M]
  ------------------
 5523|  1.65k|      quant = XML_CQUANT_PLUS;
 5524|  26.0k|    elementContent:
 5525|  26.0k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5525:11): [True: 0, False: 26.0k]
  ------------------
 5526|      0|        ELEMENT_TYPE *el;
 5527|      0|        const XML_Char *name;
 5528|      0|        size_t nameLen;
 5529|      0|        const char *nxt
 5530|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5530:16): [True: 0, False: 0]
  ------------------
 5531|      0|        int myindex = nextScaffoldPart(parser);
 5532|      0|        if (myindex < 0)
  ------------------
  |  Branch (5532:13): [True: 0, False: 0]
  ------------------
 5533|      0|          return XML_ERROR_NO_MEMORY;
 5534|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5535|      0|        dtd->scaffold[myindex].quant = quant;
 5536|      0|        el = getElementType(parser, enc, s, nxt);
 5537|      0|        if (! el)
  ------------------
  |  Branch (5537:13): [True: 0, False: 0]
  ------------------
 5538|      0|          return XML_ERROR_NO_MEMORY;
 5539|      0|        name = el->name;
 5540|      0|        dtd->scaffold[myindex].name = name;
 5541|      0|        nameLen = 0;
 5542|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5542:16): [True: 0, False: 0]
  ------------------
 5543|      0|          ;
 5544|       |
 5545|       |        /* Detect and prevent integer overflow */
 5546|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5546:13): [True: 0, False: 0]
  ------------------
 5547|      0|          return XML_ERROR_NO_MEMORY;
 5548|      0|        }
 5549|       |
 5550|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5551|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5551:13): [True: 0, False: 0]
  ------------------
 5552|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5553|      0|      }
 5554|  26.0k|      break;
 5555|       |
 5556|  26.0k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5556:5): [True: 10.8k, False: 3.83M]
  ------------------
 5557|  10.8k|      quant = XML_CQUANT_NONE;
 5558|  10.8k|      goto closeGroup;
 5559|  14.2k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5559:5): [True: 14.2k, False: 3.82M]
  ------------------
 5560|  14.2k|      quant = XML_CQUANT_OPT;
 5561|  14.2k|      goto closeGroup;
 5562|  1.71k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5562:5): [True: 1.71k, False: 3.84M]
  ------------------
 5563|  1.71k|      quant = XML_CQUANT_REP;
 5564|  1.71k|      goto closeGroup;
 5565|  29.0k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5565:5): [True: 29.0k, False: 3.81M]
  ------------------
 5566|  29.0k|      quant = XML_CQUANT_PLUS;
 5567|  55.9k|    closeGroup:
 5568|  55.9k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5568:11): [True: 0, False: 55.9k]
  ------------------
 5569|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5569:13): [True: 0, False: 0]
  ------------------
 5570|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5571|      0|        dtd->scaffLevel--;
 5572|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5573|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5573:13): [True: 0, False: 0]
  ------------------
 5574|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5574:15): [True: 0, False: 0]
  ------------------
 5575|      0|            XML_Content *model = build_model(parser);
 5576|      0|            if (! model)
  ------------------
  |  Branch (5576:17): [True: 0, False: 0]
  ------------------
 5577|      0|              return XML_ERROR_NO_MEMORY;
 5578|      0|            *eventEndPP = s;
 5579|      0|            parser->m_elementDeclHandler(
 5580|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5581|      0|          }
 5582|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5583|      0|          dtd->contentStringLen = 0;
 5584|      0|        }
 5585|      0|      }
 5586|  55.9k|      break;
 5587|       |      /* End element declaration stuff */
 5588|       |
 5589|  55.9k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5589:5): [True: 6.08k, False: 3.83M]
  ------------------
 5590|  6.08k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5590:11): [True: 0, False: 6.08k]
  ------------------
 5591|      0|        return XML_ERROR_NO_MEMORY;
 5592|  6.08k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  6.08k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5593|  6.08k|      break;
 5594|  1.35k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5594:5): [True: 1.35k, False: 3.84M]
  ------------------
 5595|  1.35k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5595:11): [True: 0, False: 1.35k]
  ------------------
 5596|      0|        return XML_ERROR_NO_MEMORY;
 5597|  1.35k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.35k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5598|  1.35k|      break;
 5599|  10.8k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5599:5): [True: 10.8k, False: 3.83M]
  ------------------
 5600|  10.8k|      switch (tok) {
  ------------------
  |  Branch (5600:15): [True: 5.10k, False: 5.78k]
  ------------------
 5601|  5.78k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  5.78k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5601:7): [True: 5.78k, False: 5.10k]
  ------------------
 5602|  5.78k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  5.78k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5603|  5.78k|        break;
 5604|  10.8k|      }
 5605|  10.8k|      break;
 5606|  14.6k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5606:5): [True: 14.6k, False: 3.82M]
  ------------------
 5607|  14.6k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5607:11): [True: 0, False: 14.6k]
  ------------------
 5608|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5609|  14.6k|      break;
 5610|  48.1k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5610:5): [True: 48.1k, False: 3.79M]
  ------------------
 5611|  48.1k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5611:11): [True: 45.4k, False: 2.78k]
  |  Branch (5611:34): [True: 0, False: 45.4k]
  ------------------
 5612|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5613|  48.1k|      break;
 5614|  3.92k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5614:5): [True: 3.92k, False: 3.83M]
  ------------------
 5615|  3.92k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5615:11): [True: 0, False: 3.92k]
  ------------------
 5616|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5617|  3.92k|      break;
 5618|   355k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5618:5): [True: 355k, False: 3.48M]
  ------------------
 5619|   355k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5619:11): [True: 354k, False: 1.57k]
  |  Branch (5619:34): [True: 0, False: 354k]
  ------------------
 5620|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5621|   355k|      break;
 5622|  50.7k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5622:5): [True: 50.7k, False: 3.79M]
  ------------------
 5623|  50.7k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5623:11): [True: 0, False: 50.7k]
  ------------------
 5624|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5625|  50.7k|      break;
 5626|  3.84M|    } /* end of big switch */
 5627|       |
 5628|  3.83M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5628:9): [True: 3.81M, False: 13.2k]
  |  Branch (5628:26): [True: 0, False: 3.81M]
  ------------------
 5629|      0|      reportDefault(parser, enc, s, next);
 5630|       |
 5631|  3.83M|    switch (parser->m_parsingStatus.parsing) {
 5632|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5632:5): [True: 0, False: 3.83M]
  ------------------
 5633|      0|      *nextPtr = next;
 5634|      0|      return XML_ERROR_NONE;
 5635|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5635:5): [True: 0, False: 3.83M]
  ------------------
 5636|      0|      return XML_ERROR_ABORTED;
 5637|  3.83M|    default:
  ------------------
  |  Branch (5637:5): [True: 3.83M, False: 0]
  ------------------
 5638|  3.83M|      s = next;
 5639|  3.83M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  3.83M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  3.83M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5640|  3.83M|    }
 5641|  3.83M|  }
 5642|       |  /* not reached */
 5643|  16.6k|}
xmlparse.c:accountingDiffTolerated:
 7737|  82.6M|                        enum XML_Account account) {
 7738|       |  /* Note: We need to check the token type *first* to be sure that
 7739|       |   *       we can even access variable <after>, safely.
 7740|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7741|  82.6M|  switch (tok) {
  ------------------
  |  Branch (7741:11): [True: 82.3M, False: 352k]
  ------------------
 7742|  2.76k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.76k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7742:3): [True: 2.76k, False: 82.6M]
  ------------------
 7743|  4.95k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  4.95k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7743:3): [True: 2.18k, False: 82.6M]
  ------------------
 7744|  5.31k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.31k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7744:3): [True: 362, False: 82.6M]
  ------------------
 7745|   352k|  case XML_TOK_NONE:
  ------------------
  |  |   51|   352k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7745:3): [True: 346k, False: 82.3M]
  ------------------
 7746|   352k|    return XML_TRUE;
  ------------------
  |  |   55|   352k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7747|  82.6M|  }
 7748|       |
 7749|  82.3M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7749:7): [True: 809k, False: 81.5M]
  ------------------
 7750|   809k|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|   809k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7751|       |
 7752|  81.5M|  unsigned int levelsAwayFromRootParser;
 7753|  81.5M|  const XML_Parser rootParser
 7754|  81.5M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7755|  81.5M|  assert(! rootParser->m_parentParser);
 7756|       |
 7757|      0|  const int isDirect
 7758|  81.5M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7758:9): [True: 4.77M, False: 76.7M]
  |  Branch (7758:44): [True: 4.77M, False: 0]
  ------------------
 7759|  81.5M|  const ptrdiff_t bytesMore = after - before;
 7760|       |
 7761|  81.5M|  XmlBigCount *const additionTarget
 7762|  81.5M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7762:9): [True: 4.77M, False: 76.7M]
  ------------------
 7763|  81.5M|                 : &rootParser->m_accounting.countBytesIndirect;
 7764|       |
 7765|       |  /* Detect and avoid integer overflow */
 7766|  81.5M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7766:7): [True: 0, False: 81.5M]
  ------------------
 7767|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7768|  81.5M|  *additionTarget += bytesMore;
 7769|       |
 7770|  81.5M|  const XmlBigCount countBytesOutput
 7771|  81.5M|      = rootParser->m_accounting.countBytesDirect
 7772|  81.5M|        + rootParser->m_accounting.countBytesIndirect;
 7773|  81.5M|  const float amplificationFactor
 7774|  81.5M|      = accountingGetCurrentAmplification(rootParser);
 7775|  81.5M|  const XML_Bool tolerated
 7776|  81.5M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7776:9): [True: 50.9M, False: 30.5M]
  ------------------
 7777|  81.5M|        || (amplificationFactor
  ------------------
  |  Branch (7777:12): [True: 30.5M, False: 29]
  ------------------
 7778|  30.5M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7779|       |
 7780|  81.5M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7780:7): [True: 0, False: 81.5M]
  ------------------
 7781|      0|    accountingReportStats(rootParser, "");
 7782|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7783|      0|                         bytesMore, source_line, account);
 7784|      0|  }
 7785|       |
 7786|  81.5M|  return tolerated;
 7787|  81.5M|}
xmlparse.c:getRootParserOf:
 7852|  82.1M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7853|  82.1M|  XML_Parser rootParser = parser;
 7854|  82.1M|  unsigned int stepsTakenUpwards = 0;
 7855|  82.1M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7855:10): [True: 0, False: 82.1M]
  ------------------
 7856|      0|    rootParser = rootParser->m_parentParser;
 7857|      0|    stepsTakenUpwards++;
 7858|      0|  }
 7859|  82.1M|  assert(! rootParser->m_parentParser);
 7860|  82.1M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7860:7): [True: 81.5M, False: 645k]
  ------------------
 7861|  81.5M|    *outLevelDiff = stepsTakenUpwards;
 7862|  81.5M|  }
 7863|  82.1M|  return rootParser;
 7864|  82.1M|}
xmlparse.c:accountingGetCurrentAmplification:
 7660|  81.5M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7661|  81.5M|  const XmlBigCount countBytesOutput
 7662|  81.5M|      = rootParser->m_accounting.countBytesDirect
 7663|  81.5M|        + rootParser->m_accounting.countBytesIndirect;
 7664|  81.5M|  const float amplificationFactor
 7665|  81.5M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7665:9): [True: 81.5M, False: 0]
  ------------------
 7666|  81.5M|            ? (countBytesOutput
 7667|  81.5M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7668|  81.5M|            : 1.0f;
 7669|  81.5M|  assert(! rootParser->m_parentParser);
 7670|      0|  return amplificationFactor;
 7671|  81.5M|}
xmlparse.c:accountingReportStats:
 7674|     29|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7675|     29|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7676|     29|  assert(! rootParser->m_parentParser);
 7677|       |
 7678|     29|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7678:7): [True: 29, False: 0]
  ------------------
 7679|     29|    return;
 7680|     29|  }
 7681|       |
 7682|      0|  const float amplificationFactor
 7683|      0|      = accountingGetCurrentAmplification(rootParser);
 7684|      0|  fprintf(stderr,
 7685|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7686|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7687|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7688|      0|          rootParser->m_accounting.countBytesIndirect,
 7689|      0|          (double)amplificationFactor, epilog);
 7690|      0|}
xmlparse.c:accountingOnAbort:
 7693|     29|accountingOnAbort(XML_Parser originParser) {
 7694|     29|  accountingReportStats(originParser, " ABORTING\n");
 7695|     29|}
xmlparse.c:processXmlDecl:
 4280|    278|               const char *next) {
 4281|    278|  const char *encodingName = NULL;
 4282|    278|  const XML_Char *storedEncName = NULL;
 4283|    278|  const ENCODING *newEncoding = NULL;
 4284|    278|  const char *version = NULL;
 4285|    278|  const char *versionend = NULL;
 4286|    278|  const XML_Char *storedversion = NULL;
 4287|    278|  int standalone = -1;
 4288|       |
 4289|    278|#ifdef XML_DTD
 4290|    278|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    278|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4290:7): [True: 0, False: 278]
  ------------------
 4291|    278|                                XML_ACCOUNT_DIRECT)) {
 4292|      0|    accountingOnAbort(parser);
 4293|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4294|      0|  }
 4295|    278|#endif
 4296|       |
 4297|    278|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4297:7): [True: 216, False: 62]
  |  Branch (4297:10): [True: 0, False: 278]
  ------------------
 4298|    278|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4299|    278|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4300|    216|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4300:9): [True: 0, False: 216]
  ------------------
 4301|      0|      return XML_ERROR_TEXT_DECL;
 4302|    216|    else
 4303|    216|      return XML_ERROR_XML_DECL;
 4304|    216|  }
 4305|     62|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4305:7): [True: 62, False: 0]
  |  Branch (4305:32): [True: 23, False: 39]
  ------------------
 4306|     23|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     23|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4307|     23|#ifdef XML_DTD
 4308|     23|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4308:9): [True: 0, False: 23]
  ------------------
 4309|     23|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4310|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4311|     23|#endif /* XML_DTD */
 4312|     23|  }
 4313|     62|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4313:7): [True: 0, False: 62]
  ------------------
 4314|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4314:9): [True: 0, False: 0]
  ------------------
 4315|      0|      storedEncName = poolStoreString(
 4316|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4317|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4318|      0|      if (! storedEncName)
  ------------------
  |  Branch (4318:11): [True: 0, False: 0]
  ------------------
 4319|      0|        return XML_ERROR_NO_MEMORY;
 4320|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4321|      0|    }
 4322|      0|    if (version) {
  ------------------
  |  Branch (4322:9): [True: 0, False: 0]
  ------------------
 4323|      0|      storedversion
 4324|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4325|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4326|      0|      if (! storedversion)
  ------------------
  |  Branch (4326:11): [True: 0, False: 0]
  ------------------
 4327|      0|        return XML_ERROR_NO_MEMORY;
 4328|      0|    }
 4329|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4330|      0|                             standalone);
 4331|     62|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4331:14): [True: 0, False: 62]
  ------------------
 4332|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4333|     62|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4333:7): [True: 0, False: 62]
  ------------------
 4334|      0|    if (newEncoding) {
  ------------------
  |  Branch (4334:9): [True: 0, False: 0]
  ------------------
 4335|       |      /* Check that the specified encoding does not conflict with what
 4336|       |       * the parser has already deduced.  Do we have the same number
 4337|       |       * of bytes in the smallest representation of a character?  If
 4338|       |       * this is UTF-16, is it the same endianness?
 4339|       |       */
 4340|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4340:11): [True: 0, False: 0]
  ------------------
 4341|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4341:15): [True: 0, False: 0]
  ------------------
 4342|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4342:18): [True: 0, False: 0]
  ------------------
 4343|      0|        parser->m_eventPtr = encodingName;
 4344|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4345|      0|      }
 4346|      0|      parser->m_encoding = newEncoding;
 4347|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4347:16): [True: 0, False: 0]
  ------------------
 4348|      0|      enum XML_Error result;
 4349|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4349:11): [True: 0, False: 0]
  ------------------
 4350|      0|        storedEncName = poolStoreString(
 4351|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4352|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4353|      0|        if (! storedEncName)
  ------------------
  |  Branch (4353:13): [True: 0, False: 0]
  ------------------
 4354|      0|          return XML_ERROR_NO_MEMORY;
 4355|      0|      }
 4356|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4357|      0|      poolClear(&parser->m_temp2Pool);
 4358|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4358:11): [True: 0, False: 0]
  ------------------
 4359|      0|        parser->m_eventPtr = encodingName;
 4360|      0|      return result;
 4361|      0|    }
 4362|      0|  }
 4363|       |
 4364|     62|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4364:7): [True: 0, False: 62]
  |  Branch (4364:24): [True: 0, False: 62]
  ------------------
 4365|      0|    poolClear(&parser->m_temp2Pool);
 4366|       |
 4367|     62|  return XML_ERROR_NONE;
 4368|     62|}
xmlparse.c:poolStoreString:
 7284|   468k|                const char *end) {
 7285|   468k|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7285:7): [True: 0, False: 468k]
  ------------------
 7286|      0|    return NULL;
 7287|   468k|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7287:7): [True: 108, False: 468k]
  |  Branch (7287:33): [True: 0, False: 108]
  ------------------
 7288|      0|    return NULL;
 7289|   468k|  *(pool->ptr)++ = 0;
 7290|   468k|  return pool->start;
 7291|   468k|}
xmlparse.c:lookup:
 7043|  4.10M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7044|  4.10M|  size_t i;
 7045|  4.10M|  if (table->size == 0) {
  ------------------
  |  Branch (7045:7): [True: 49.3k, False: 4.05M]
  ------------------
 7046|  49.3k|    size_t tsize;
 7047|  49.3k|    if (! createSize)
  ------------------
  |  Branch (7047:9): [True: 35.0k, False: 14.3k]
  ------------------
 7048|  35.0k|      return NULL;
 7049|  14.3k|    table->power = INIT_POWER;
  ------------------
  |  | 7007|  14.3k|#define INIT_POWER 6
  ------------------
 7050|       |    /* table->size is a power of 2 */
 7051|  14.3k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7007|  14.3k|#define INIT_POWER 6
  ------------------
 7052|  14.3k|    tsize = table->size * sizeof(NAMED *);
 7053|  14.3k|    table->v = table->mem->malloc_fcn(tsize);
 7054|  14.3k|    if (! table->v) {
  ------------------
  |  Branch (7054:9): [True: 0, False: 14.3k]
  ------------------
 7055|      0|      table->size = 0;
 7056|      0|      return NULL;
 7057|      0|    }
 7058|  14.3k|    memset(table->v, 0, tsize);
 7059|  14.3k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7060|  4.05M|  } else {
 7061|  4.05M|    unsigned long h = hash(parser, name);
 7062|  4.05M|    unsigned long mask = (unsigned long)table->size - 1;
 7063|  4.05M|    unsigned char step = 0;
 7064|  4.05M|    i = h & mask;
 7065|  4.09M|    while (table->v[i]) {
  ------------------
  |  Branch (7065:12): [True: 4.06M, False: 28.2k]
  ------------------
 7066|  4.06M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7066:11): [True: 4.02M, False: 42.7k]
  ------------------
 7067|  4.02M|        return table->v[i];
 7068|  42.7k|      if (! step)
  ------------------
  |  Branch (7068:11): [True: 34.1k, False: 8.64k]
  ------------------
 7069|  34.1k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  235|  34.1k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  34.1k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7070|  42.7k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7070:7): [True: 6.21k, False: 36.5k]
  ------------------
 7071|  42.7k|    }
 7072|  28.2k|    if (! createSize)
  ------------------
  |  Branch (7072:9): [True: 7.53k, False: 20.6k]
  ------------------
 7073|  7.53k|      return NULL;
 7074|       |
 7075|       |    /* check for overflow (table is half full) */
 7076|  20.6k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7076:9): [True: 265, False: 20.4k]
  ------------------
 7077|    265|      unsigned char newPower = table->power + 1;
 7078|       |
 7079|       |      /* Detect and prevent invalid shift */
 7080|    265|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7080:11): [True: 0, False: 265]
  ------------------
 7081|      0|        return NULL;
 7082|      0|      }
 7083|       |
 7084|    265|      size_t newSize = (size_t)1 << newPower;
 7085|    265|      unsigned long newMask = (unsigned long)newSize - 1;
 7086|       |
 7087|       |      /* Detect and prevent integer overflow */
 7088|    265|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7088:11): [True: 0, False: 265]
  ------------------
 7089|      0|        return NULL;
 7090|      0|      }
 7091|       |
 7092|    265|      size_t tsize = newSize * sizeof(NAMED *);
 7093|    265|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7094|    265|      if (! newV)
  ------------------
  |  Branch (7094:11): [True: 0, False: 265]
  ------------------
 7095|      0|        return NULL;
 7096|    265|      memset(newV, 0, tsize);
 7097|  35.8k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7097:19): [True: 35.5k, False: 265]
  ------------------
 7098|  35.5k|        if (table->v[i]) {
  ------------------
  |  Branch (7098:13): [True: 17.7k, False: 17.7k]
  ------------------
 7099|  17.7k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7100|  17.7k|          size_t j = newHash & newMask;
 7101|  17.7k|          step = 0;
 7102|  20.5k|          while (newV[j]) {
  ------------------
  |  Branch (7102:18): [True: 2.78k, False: 17.7k]
  ------------------
 7103|  2.78k|            if (! step)
  ------------------
  |  Branch (7103:17): [True: 2.26k, False: 515]
  ------------------
 7104|  2.26k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  235|  2.26k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  2.26k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7105|  2.78k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7105:13): [True: 401, False: 2.38k]
  ------------------
 7106|  2.78k|          }
 7107|  17.7k|          newV[j] = table->v[i];
 7108|  17.7k|        }
 7109|    265|      table->mem->free_fcn(table->v);
 7110|    265|      table->v = newV;
 7111|    265|      table->power = newPower;
 7112|    265|      table->size = newSize;
 7113|    265|      i = h & newMask;
 7114|    265|      step = 0;
 7115|    397|      while (table->v[i]) {
  ------------------
  |  Branch (7115:14): [True: 132, False: 265]
  ------------------
 7116|    132|        if (! step)
  ------------------
  |  Branch (7116:13): [True: 96, False: 36]
  ------------------
 7117|     96|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  235|     96|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|     96|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7118|    132|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7118:9): [True: 27, False: 105]
  ------------------
 7119|    132|      }
 7120|    265|    }
 7121|  20.6k|  }
 7122|  35.0k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7123|  35.0k|  if (! table->v[i])
  ------------------
  |  Branch (7123:7): [True: 0, False: 35.0k]
  ------------------
 7124|      0|    return NULL;
 7125|  35.0k|  memset(table->v[i], 0, createSize);
 7126|  35.0k|  table->v[i]->name = name;
 7127|  35.0k|  (table->used)++;
 7128|  35.0k|  return table->v[i];
 7129|  35.0k|}
xmlparse.c:hash:
 7032|  4.08M|hash(XML_Parser parser, KEY s) {
 7033|  4.08M|  struct siphash state;
 7034|  4.08M|  struct sipkey key;
 7035|  4.08M|  (void)sip24_valid;
 7036|  4.08M|  copy_salt_to_sipkey(parser, &key);
 7037|  4.08M|  sip24_init(&state, &key);
 7038|  4.08M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7039|  4.08M|  return (unsigned long)sip24_final(&state);
 7040|  4.08M|}
xmlparse.c:copy_salt_to_sipkey:
 7026|  4.08M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7027|  4.08M|  key->k[0] = 0;
 7028|  4.08M|  key->k[1] = get_hash_secret_salt(parser);
 7029|  4.08M|}
xmlparse.c:get_hash_secret_salt:
  947|  4.08M|get_hash_secret_salt(XML_Parser parser) {
  948|  4.08M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (948:7): [True: 0, False: 4.08M]
  ------------------
  949|      0|    return get_hash_secret_salt(parser->m_parentParser);
  950|  4.08M|  return parser->m_hash_secret_salt;
  951|  4.08M|}
xmlparse.c:keylen:
 7018|  4.08M|keylen(KEY s) {
 7019|  4.08M|  size_t len = 0;
 7020|  13.2M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7020:10): [True: 9.16M, False: 4.08M]
  ------------------
 7021|  9.16M|    ;
 7022|  4.08M|  return len;
 7023|  4.08M|}
xmlparse.c:keyeq:
 7010|  4.06M|keyeq(KEY s1, KEY s2) {
 7011|  12.7M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7011:10): [True: 12.6M, False: 42.7k]
  ------------------
 7012|  12.6M|    if (*s1 == 0)
  ------------------
  |  Branch (7012:9): [True: 4.02M, False: 8.64M]
  ------------------
 7013|  4.02M|      return XML_TRUE;
  ------------------
  |  |   55|  4.02M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7014|  42.7k|  return XML_FALSE;
  ------------------
  |  |   56|  42.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7015|  4.06M|}
xmlparse.c:normalizePublicId:
 6695|    880|normalizePublicId(XML_Char *publicId) {
 6696|    880|  XML_Char *p = publicId;
 6697|    880|  XML_Char *s;
 6698|  36.4k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6698:22): [True: 35.5k, False: 880]
  ------------------
 6699|  35.5k|    switch (*s) {
 6700|  1.09k|    case 0x20:
  ------------------
  |  Branch (6700:5): [True: 1.09k, False: 34.4k]
  ------------------
 6701|  1.83k|    case 0xD:
  ------------------
  |  Branch (6701:5): [True: 742, False: 34.8k]
  ------------------
 6702|  2.78k|    case 0xA:
  ------------------
  |  Branch (6702:5): [True: 944, False: 34.6k]
  ------------------
 6703|  2.78k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6703:11): [True: 1.71k, False: 1.06k]
  |  Branch (6703:28): [True: 948, False: 768]
  ------------------
 6704|    948|        *p++ = 0x20;
 6705|  2.78k|      break;
 6706|  32.7k|    default:
  ------------------
  |  Branch (6706:5): [True: 32.7k, False: 2.78k]
  ------------------
 6707|  32.7k|      *p++ = *s;
 6708|  35.5k|    }
 6709|  35.5k|  }
 6710|    880|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6710:7): [True: 632, False: 248]
  |  Branch (6710:24): [True: 85, False: 547]
  ------------------
 6711|     85|    --p;
 6712|    880|  *p = XML_T('\0');
  ------------------
  |  |  191|    880|#  define XML_T(x) x
  ------------------
 6713|    880|}
xmlparse.c:contentProcessor:
 2622|  9.59k|                 const char **endPtr) {
 2623|  9.59k|  enum XML_Error result = doContent(
 2624|  9.59k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2625|  9.59k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2626|  9.59k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2626:7): [True: 5.39k, False: 4.20k]
  ------------------
 2627|  5.39k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2627:9): [True: 0, False: 5.39k]
  ------------------
 2628|      0|      return XML_ERROR_NO_MEMORY;
 2629|  5.39k|  }
 2630|  9.59k|  return result;
 2631|  9.59k|}
xmlparse.c:doContent:
 2752|  97.1k|          XML_Bool haveMore, enum XML_Account account) {
 2753|       |  /* save one level of indirection */
 2754|  97.1k|  DTD *const dtd = parser->m_dtd;
 2755|       |
 2756|  97.1k|  const char **eventPP;
 2757|  97.1k|  const char **eventEndPP;
 2758|  97.1k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2758:7): [True: 9.59k, False: 87.5k]
  ------------------
 2759|  9.59k|    eventPP = &parser->m_eventPtr;
 2760|  9.59k|    eventEndPP = &parser->m_eventEndPtr;
 2761|  87.5k|  } else {
 2762|  87.5k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2763|  87.5k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2764|  87.5k|  }
 2765|  97.1k|  *eventPP = s;
 2766|       |
 2767|  4.57M|  for (;;) {
 2768|  4.57M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2769|  4.57M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  4.57M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  4.57M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2770|  4.57M|#ifdef XML_DTD
 2771|  4.57M|    const char *accountAfter
 2772|  4.57M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  4.57M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  4.57M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2772:12): [True: 844, False: 4.57M]
  |  Branch (2772:46): [True: 44, False: 4.57M]
  ------------------
 2773|  4.57M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2773:18): [True: 81, False: 807]
  ------------------
 2774|  4.57M|              : next;
 2775|  4.57M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2775:9): [True: 2, False: 4.57M]
  ------------------
 2776|  4.57M|                                  account)) {
 2777|      2|      accountingOnAbort(parser);
 2778|      2|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2779|      2|    }
 2780|  4.57M|#endif
 2781|  4.57M|    *eventEndPP = next;
 2782|  4.57M|    switch (tok) {
 2783|     44|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     44|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2783:5): [True: 44, False: 4.57M]
  ------------------
 2784|     44|      if (haveMore) {
  ------------------
  |  Branch (2784:11): [True: 44, False: 0]
  ------------------
 2785|     44|        *nextPtr = s;
 2786|     44|        return XML_ERROR_NONE;
 2787|     44|      }
 2788|      0|      *eventEndPP = end;
 2789|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2789:11): [True: 0, False: 0]
  ------------------
 2790|      0|        XML_Char c = 0xA;
 2791|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2792|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2792:18): [True: 0, False: 0]
  ------------------
 2793|      0|        reportDefault(parser, enc, s, end);
 2794|       |      /* We are at the end of the final buffer, should we check for
 2795|       |         XML_SUSPENDED, XML_FINISHED?
 2796|       |      */
 2797|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2797:11): [True: 0, False: 0]
  ------------------
 2798|      0|        return XML_ERROR_NO_ELEMENTS;
 2799|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2799:11): [True: 0, False: 0]
  ------------------
 2800|      0|        return XML_ERROR_ASYNC_ENTITY;
 2801|      0|      *nextPtr = end;
 2802|      0|      return XML_ERROR_NONE;
 2803|  88.8k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  88.8k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2803:5): [True: 88.8k, False: 4.48M]
  ------------------
 2804|  88.8k|      if (haveMore) {
  ------------------
  |  Branch (2804:11): [True: 2.59k, False: 86.2k]
  ------------------
 2805|  2.59k|        *nextPtr = s;
 2806|  2.59k|        return XML_ERROR_NONE;
 2807|  2.59k|      }
 2808|  86.2k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2808:11): [True: 86.2k, False: 0]
  ------------------
 2809|  86.2k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2809:13): [True: 42, False: 86.1k]
  ------------------
 2810|     42|          return XML_ERROR_ASYNC_ENTITY;
 2811|  86.1k|        *nextPtr = s;
 2812|  86.1k|        return XML_ERROR_NONE;
 2813|  86.2k|      }
 2814|      0|      return XML_ERROR_NO_ELEMENTS;
 2815|  2.56k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.56k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2815:5): [True: 2.56k, False: 4.57M]
  ------------------
 2816|  2.56k|      *eventPP = next;
 2817|  2.56k|      return XML_ERROR_INVALID_TOKEN;
 2818|  2.00k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.00k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2818:5): [True: 2.00k, False: 4.57M]
  ------------------
 2819|  2.00k|      if (haveMore) {
  ------------------
  |  Branch (2819:11): [True: 1.89k, False: 113]
  ------------------
 2820|  1.89k|        *nextPtr = s;
 2821|  1.89k|        return XML_ERROR_NONE;
 2822|  1.89k|      }
 2823|    113|      return XML_ERROR_UNCLOSED_TOKEN;
 2824|    280|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    280|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2824:5): [True: 280, False: 4.57M]
  ------------------
 2825|    280|      if (haveMore) {
  ------------------
  |  Branch (2825:11): [True: 280, False: 0]
  ------------------
 2826|    280|        *nextPtr = s;
 2827|    280|        return XML_ERROR_NONE;
 2828|    280|      }
 2829|      0|      return XML_ERROR_PARTIAL_CHAR;
 2830|   119k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   119k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2830:5): [True: 119k, False: 4.45M]
  ------------------
 2831|   119k|      const XML_Char *name;
 2832|   119k|      ENTITY *entity;
 2833|   119k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   119k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2834|   119k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2835|   119k|      if (ch) {
  ------------------
  |  Branch (2835:11): [True: 1.79k, False: 117k]
  ------------------
 2836|  1.79k|#ifdef XML_DTD
 2837|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2838|       |         *       so there is no amplification and hence recording without
 2839|       |         *       protection. */
 2840|  1.79k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2841|  1.79k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2842|  1.79k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2843|  1.79k|#endif /* XML_DTD */
 2844|  1.79k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2844:13): [True: 0, False: 1.79k]
  ------------------
 2845|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2846|  1.79k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2846:18): [True: 0, False: 1.79k]
  ------------------
 2847|      0|          reportDefault(parser, enc, s, next);
 2848|  1.79k|        break;
 2849|  1.79k|      }
 2850|   117k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2851|   117k|                             next - enc->minBytesPerChar);
 2852|   117k|      if (! name)
  ------------------
  |  Branch (2852:11): [True: 0, False: 117k]
  ------------------
 2853|      0|        return XML_ERROR_NO_MEMORY;
 2854|   117k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2855|   117k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  600|   117k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2856|       |      /* First, determine if a check for an existing declaration is needed;
 2857|       |         if yes, check that the entity exists, and that it is internal,
 2858|       |         otherwise call the skipped entity or default handler.
 2859|       |      */
 2860|   117k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2860:11): [True: 85.4k, False: 32.3k]
  |  Branch (2860:40): [True: 73, False: 32.2k]
  ------------------
 2861|  85.4k|        if (! entity)
  ------------------
  |  Branch (2861:13): [True: 263, False: 85.2k]
  ------------------
 2862|    263|          return XML_ERROR_UNDEFINED_ENTITY;
 2863|  85.2k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2863:18): [True: 0, False: 85.2k]
  ------------------
 2864|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2865|  85.4k|      } else if (! entity) {
  ------------------
  |  Branch (2865:18): [True: 29.8k, False: 2.40k]
  ------------------
 2866|  29.8k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2866:13): [True: 0, False: 29.8k]
  ------------------
 2867|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2868|  29.8k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2868:18): [True: 0, False: 29.8k]
  ------------------
 2869|      0|          reportDefault(parser, enc, s, next);
 2870|  29.8k|        break;
 2871|  29.8k|      }
 2872|  87.6k|      if (entity->open)
  ------------------
  |  Branch (2872:11): [True: 13, False: 87.6k]
  ------------------
 2873|     13|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2874|  87.6k|      if (entity->notation)
  ------------------
  |  Branch (2874:11): [True: 0, False: 87.6k]
  ------------------
 2875|      0|        return XML_ERROR_BINARY_ENTITY_REF;
 2876|  87.6k|      if (entity->textPtr) {
  ------------------
  |  Branch (2876:11): [True: 87.5k, False: 72]
  ------------------
 2877|  87.5k|        enum XML_Error result;
 2878|  87.5k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2878:13): [True: 0, False: 87.5k]
  ------------------
 2879|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2879:15): [True: 0, False: 0]
  ------------------
 2880|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2881|      0|                                           0);
 2882|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2882:20): [True: 0, False: 0]
  ------------------
 2883|      0|            reportDefault(parser, enc, s, next);
 2884|      0|          break;
 2885|      0|        }
 2886|  87.5k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|  87.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2887|  87.5k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2887:13): [True: 576, False: 86.9k]
  ------------------
 2888|    576|          return result;
 2889|  87.5k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2889:18): [True: 0, False: 72]
  ------------------
 2890|      0|        const XML_Char *context;
 2891|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2892|      0|        context = getContext(parser);
 2893|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2894|      0|        if (! context)
  ------------------
  |  Branch (2894:13): [True: 0, False: 0]
  ------------------
 2895|      0|          return XML_ERROR_NO_MEMORY;
 2896|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2896:13): [True: 0, False: 0]
  ------------------
 2897|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2898|      0|                entity->systemId, entity->publicId))
 2899|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2900|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2901|     72|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2901:18): [True: 0, False: 72]
  ------------------
 2902|      0|        reportDefault(parser, enc, s, next);
 2903|  87.0k|      break;
 2904|  87.6k|    }
 2905|  3.61M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  3.61M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2905:5): [True: 3.61M, False: 962k]
  ------------------
 2906|       |      /* fall through */
 2907|  3.62M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  3.62M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2907:5): [True: 7.60k, False: 4.56M]
  ------------------
 2908|  3.62M|      TAG *tag;
 2909|  3.62M|      enum XML_Error result;
 2910|  3.62M|      XML_Char *toPtr;
 2911|  3.62M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2911:11): [True: 19.4k, False: 3.60M]
  ------------------
 2912|  19.4k|        tag = parser->m_freeTagList;
 2913|  19.4k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2914|  3.60M|      } else {
 2915|  3.60M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  714|  3.60M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2916|  3.60M|        if (! tag)
  ------------------
  |  Branch (2916:13): [True: 0, False: 3.60M]
  ------------------
 2917|      0|          return XML_ERROR_NO_MEMORY;
 2918|  3.60M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  714|  3.60M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2919|  3.60M|        if (! tag->buf) {
  ------------------
  |  Branch (2919:13): [True: 0, False: 3.60M]
  ------------------
 2920|      0|          FREE(parser, tag);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2921|      0|          return XML_ERROR_NO_MEMORY;
 2922|      0|        }
 2923|  3.60M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  242|  3.60M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2924|  3.60M|      }
 2925|  3.62M|      tag->bindings = NULL;
 2926|  3.62M|      tag->parent = parser->m_tagStack;
 2927|  3.62M|      parser->m_tagStack = tag;
 2928|  3.62M|      tag->name.localPart = NULL;
 2929|  3.62M|      tag->name.prefix = NULL;
 2930|  3.62M|      tag->rawName = s + enc->minBytesPerChar;
 2931|  3.62M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  3.62M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2932|  3.62M|      ++parser->m_tagLevel;
 2933|  3.62M|      {
 2934|  3.62M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2935|  3.62M|        const char *fromPtr = tag->rawName;
 2936|  3.62M|        toPtr = (XML_Char *)tag->buf;
 2937|  3.62M|        for (;;) {
 2938|  3.62M|          int bufSize;
 2939|  3.62M|          int convLen;
 2940|  3.62M|          const enum XML_Convert_Result convert_res
 2941|  3.62M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  161|  3.62M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  3.62M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2942|  3.62M|                           (ICHAR *)tag->bufEnd - 1);
 2943|  3.62M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2944|  3.62M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2944:15): [True: 3.62M, False: 1.46k]
  ------------------
 2945|  3.62M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2945:18): [True: 0, False: 1.46k]
  ------------------
 2946|  3.62M|            tag->name.strLen = convLen;
 2947|  3.62M|            break;
 2948|  3.62M|          }
 2949|  1.46k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2950|  1.46k|          {
 2951|  1.46k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|  1.46k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2952|  1.46k|            if (temp == NULL)
  ------------------
  |  Branch (2952:17): [True: 0, False: 1.46k]
  ------------------
 2953|      0|              return XML_ERROR_NO_MEMORY;
 2954|  1.46k|            tag->buf = temp;
 2955|  1.46k|            tag->bufEnd = temp + bufSize;
 2956|  1.46k|            toPtr = (XML_Char *)temp + convLen;
 2957|  1.46k|          }
 2958|  1.46k|        }
 2959|  3.62M|      }
 2960|  3.62M|      tag->name.str = (XML_Char *)tag->buf;
 2961|  3.62M|      *toPtr = XML_T('\0');
  ------------------
  |  |  191|  3.62M|#  define XML_T(x) x
  ------------------
 2962|  3.62M|      result
 2963|  3.62M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2964|  3.62M|      if (result)
  ------------------
  |  Branch (2964:11): [True: 489, False: 3.62M]
  ------------------
 2965|    489|        return result;
 2966|  3.62M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2966:11): [True: 3.62M, False: 0]
  ------------------
 2967|  3.62M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2968|  3.62M|                                      (const XML_Char **)parser->m_atts);
 2969|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2969:16): [True: 0, False: 0]
  ------------------
 2970|      0|        reportDefault(parser, enc, s, next);
 2971|  3.62M|      poolClear(&parser->m_tempPool);
 2972|  3.62M|      break;
 2973|  3.62M|    }
 2974|  3.91k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  3.91k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2974:5): [True: 3.91k, False: 4.57M]
  ------------------
 2975|       |      /* fall through */
 2976|  9.09k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  9.09k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2976:5): [True: 5.17k, False: 4.57M]
  ------------------
 2977|  9.09k|      const char *rawName = s + enc->minBytesPerChar;
 2978|  9.09k|      enum XML_Error result;
 2979|  9.09k|      BINDING *bindings = NULL;
 2980|  9.09k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  9.09k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2981|  9.09k|      TAG_NAME name;
 2982|  9.09k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2983|  9.09k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  9.09k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2984|  9.09k|      if (! name.str)
  ------------------
  |  Branch (2984:11): [True: 0, False: 9.09k]
  ------------------
 2985|      0|        return XML_ERROR_NO_MEMORY;
 2986|  9.09k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  9.09k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2987|  9.09k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2988|  9.09k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2989|  9.09k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2989:11): [True: 12, False: 9.08k]
  ------------------
 2990|     12|        freeBindings(parser, bindings);
 2991|     12|        return result;
 2992|     12|      }
 2993|  9.08k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  9.08k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2994|  9.08k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2994:11): [True: 9.08k, False: 0]
  ------------------
 2995|  9.08k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2996|  9.08k|                                      (const XML_Char **)parser->m_atts);
 2997|  9.08k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  9.08k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2998|  9.08k|      }
 2999|  9.08k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2999:11): [True: 9.08k, False: 0]
  ------------------
 3000|  9.08k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (3000:13): [True: 9.08k, False: 0]
  ------------------
 3001|  9.08k|          *eventPP = *eventEndPP;
 3002|  9.08k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3003|  9.08k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  9.08k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3004|  9.08k|      }
 3005|  9.08k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3005:11): [True: 0, False: 9.08k]
  |  Branch (3005:28): [True: 0, False: 0]
  ------------------
 3006|      0|        reportDefault(parser, enc, s, next);
 3007|  9.08k|      poolClear(&parser->m_tempPool);
 3008|  9.08k|      freeBindings(parser, bindings);
 3009|  9.08k|    }
 3010|  9.08k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3010:11): [True: 96, False: 8.99k]
  ------------------
 3011|  9.08k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3011:14): [True: 96, False: 0]
  ------------------
 3012|     96|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3012:13): [True: 0, False: 96]
  ------------------
 3013|      0|          parser->m_processor = epilogProcessor;
 3014|     96|        else
 3015|     96|          return epilogProcessor(parser, next, end, nextPtr);
 3016|     96|      }
 3017|  8.99k|      break;
 3018|  19.9k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  19.9k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3018:5): [True: 19.9k, False: 4.55M]
  ------------------
 3019|  19.9k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3019:11): [True: 1, False: 19.9k]
  ------------------
 3020|      1|        return XML_ERROR_ASYNC_ENTITY;
 3021|  19.9k|      else {
 3022|  19.9k|        int len;
 3023|  19.9k|        const char *rawName;
 3024|  19.9k|        TAG *tag = parser->m_tagStack;
 3025|  19.9k|        rawName = s + enc->minBytesPerChar * 2;
 3026|  19.9k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  19.9k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3027|  19.9k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3027:13): [True: 25, False: 19.8k]
  ------------------
 3028|  19.9k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3028:16): [True: 169, False: 19.7k]
  ------------------
 3029|    194|          *eventPP = rawName;
 3030|    194|          return XML_ERROR_TAG_MISMATCH;
 3031|    194|        }
 3032|  19.7k|        parser->m_tagStack = tag->parent;
 3033|  19.7k|        tag->parent = parser->m_freeTagList;
 3034|  19.7k|        parser->m_freeTagList = tag;
 3035|  19.7k|        --parser->m_tagLevel;
 3036|  19.7k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3036:13): [True: 19.7k, False: 0]
  ------------------
 3037|  19.7k|          const XML_Char *localPart;
 3038|  19.7k|          const XML_Char *prefix;
 3039|  19.7k|          XML_Char *uri;
 3040|  19.7k|          localPart = tag->name.localPart;
 3041|  19.7k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3041:15): [True: 0, False: 19.7k]
  |  Branch (3041:31): [True: 0, False: 0]
  ------------------
 3042|       |            /* localPart and prefix may have been overwritten in
 3043|       |               tag->name.str, since this points to the binding->uri
 3044|       |               buffer which gets re-used; so we have to add them again
 3045|       |            */
 3046|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3047|       |            /* don't need to check for space - already done in storeAtts() */
 3048|      0|            while (*localPart)
  ------------------
  |  Branch (3048:20): [True: 0, False: 0]
  ------------------
 3049|      0|              *uri++ = *localPart++;
 3050|      0|            prefix = tag->name.prefix;
 3051|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3051:17): [True: 0, False: 0]
  |  Branch (3051:42): [True: 0, False: 0]
  ------------------
 3052|      0|              *uri++ = parser->m_namespaceSeparator;
 3053|      0|              while (*prefix)
  ------------------
  |  Branch (3053:22): [True: 0, False: 0]
  ------------------
 3054|      0|                *uri++ = *prefix++;
 3055|      0|            }
 3056|      0|            *uri = XML_T('\0');
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
 3057|      0|          }
 3058|  19.7k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3059|  19.7k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3059:20): [True: 0, False: 0]
  ------------------
 3060|      0|          reportDefault(parser, enc, s, next);
 3061|  19.7k|        while (tag->bindings) {
  ------------------
  |  Branch (3061:16): [True: 0, False: 19.7k]
  ------------------
 3062|      0|          BINDING *b = tag->bindings;
 3063|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3063:15): [True: 0, False: 0]
  ------------------
 3064|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3065|      0|                                              b->prefix->name);
 3066|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3067|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3068|      0|          parser->m_freeBindingList = b;
 3069|      0|          b->prefix->binding = b->prevPrefixBinding;
 3070|      0|        }
 3071|  19.7k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3071:13): [True: 27, False: 19.6k]
  ------------------
 3072|  19.7k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3072:16): [True: 27, False: 0]
  ------------------
 3073|     27|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3073:15): [True: 0, False: 27]
  ------------------
 3074|      0|            parser->m_processor = epilogProcessor;
 3075|     27|          else
 3076|     27|            return epilogProcessor(parser, next, end, nextPtr);
 3077|     27|        }
 3078|  19.7k|      }
 3079|  19.6k|      break;
 3080|  19.6k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  8.65k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3080:5): [True: 8.65k, False: 4.56M]
  ------------------
 3081|  8.65k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  8.65k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3082|  8.65k|      if (n < 0)
  ------------------
  |  Branch (3082:11): [True: 201, False: 8.45k]
  ------------------
 3083|    201|        return XML_ERROR_BAD_CHAR_REF;
 3084|  8.45k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3084:11): [True: 0, False: 8.45k]
  ------------------
 3085|      0|        XML_Char buf[XML_ENCODE_MAX];
 3086|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3087|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  164|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3088|  8.45k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3088:18): [True: 0, False: 8.45k]
  ------------------
 3089|      0|        reportDefault(parser, enc, s, next);
 3090|  8.45k|    } break;
 3091|      7|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      7|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3091:5): [True: 7, False: 4.57M]
  ------------------
 3092|      7|      return XML_ERROR_MISPLACED_XML_PI;
 3093|   111k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   111k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3093:5): [True: 111k, False: 4.46M]
  ------------------
 3094|   111k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3094:11): [True: 0, False: 111k]
  ------------------
 3095|      0|        XML_Char c = 0xA;
 3096|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3097|   111k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3097:18): [True: 0, False: 111k]
  ------------------
 3098|      0|        reportDefault(parser, enc, s, next);
 3099|   111k|      break;
 3100|  51.6k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  51.6k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3100:5): [True: 51.6k, False: 4.52M]
  ------------------
 3101|  51.6k|      enum XML_Error result;
 3102|  51.6k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3102:11): [True: 0, False: 51.6k]
  ------------------
 3103|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3104|       |      /* BEGIN disabled code */
 3105|       |      /* Suppose you doing a transformation on a document that involves
 3106|       |         changing only the character data.  You set up a defaultHandler
 3107|       |         and a characterDataHandler.  The defaultHandler simply copies
 3108|       |         characters through.  The characterDataHandler does the
 3109|       |         transformation and writes the characters out escaping them as
 3110|       |         necessary.  This case will fail to work if we leave out the
 3111|       |         following two lines (because & and < inside CDATA sections will
 3112|       |         be incorrectly escaped).
 3113|       |
 3114|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3115|       |         easier to let the user deal with this.
 3116|       |      */
 3117|  51.6k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3117:16): [Folded - Ignored]
  |  Branch (3117:23): [True: 0, False: 0]
  ------------------
 3118|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3119|      0|                                       0);
 3120|       |      /* END disabled code */
 3121|  51.6k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3121:16): [True: 0, False: 51.6k]
  ------------------
 3122|      0|        reportDefault(parser, enc, s, next);
 3123|  51.6k|      result
 3124|  51.6k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3125|  51.6k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3125:11): [True: 203, False: 51.4k]
  ------------------
 3126|    203|        return result;
 3127|  51.4k|      else if (! next) {
  ------------------
  |  Branch (3127:16): [True: 493, False: 50.9k]
  ------------------
 3128|    493|        parser->m_processor = cdataSectionProcessor;
 3129|    493|        return result;
 3130|    493|      }
 3131|  51.6k|    } break;
 3132|  50.9k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|    844|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3132:5): [True: 844, False: 4.57M]
  ------------------
 3133|    844|      if (haveMore) {
  ------------------
  |  Branch (3133:11): [True: 37, False: 807]
  ------------------
 3134|     37|        *nextPtr = s;
 3135|     37|        return XML_ERROR_NONE;
 3136|     37|      }
 3137|    807|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3137:11): [True: 0, False: 807]
  ------------------
 3138|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3139|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3140|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3141|      0|          parser->m_characterDataHandler(
 3142|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3143|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3144|      0|        } else
 3145|      0|          parser->m_characterDataHandler(
 3146|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3147|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3148|    807|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3148:18): [True: 0, False: 807]
  ------------------
 3149|      0|        reportDefault(parser, enc, s, end);
 3150|       |      /* We are at the end of the final buffer, should we check for
 3151|       |         XML_SUSPENDED, XML_FINISHED?
 3152|       |      */
 3153|    807|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3153:11): [True: 0, False: 807]
  ------------------
 3154|      0|        *eventPP = end;
 3155|      0|        return XML_ERROR_NO_ELEMENTS;
 3156|      0|      }
 3157|    807|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3157:11): [True: 23, False: 784]
  ------------------
 3158|     23|        *eventPP = end;
 3159|     23|        return XML_ERROR_ASYNC_ENTITY;
 3160|     23|      }
 3161|    784|      *nextPtr = end;
 3162|    784|      return XML_ERROR_NONE;
 3163|   522k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   522k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3163:5): [True: 522k, False: 4.05M]
  ------------------
 3164|   522k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3165|   522k|      if (charDataHandler) {
  ------------------
  |  Branch (3165:11): [True: 0, False: 522k]
  ------------------
 3166|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3167|      0|          for (;;) {
 3168|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3169|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3170|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3171|      0|            *eventEndPP = s;
 3172|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3173|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3174|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3174:17): [True: 0, False: 0]
  ------------------
 3175|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3175:20): [True: 0, False: 0]
  ------------------
 3176|      0|              break;
 3177|      0|            *eventPP = s;
 3178|      0|          }
 3179|      0|        } else
 3180|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3181|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3182|   522k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3182:18): [True: 0, False: 522k]
  ------------------
 3183|      0|        reportDefault(parser, enc, s, next);
 3184|   522k|    } break;
 3185|  16.9k|    case XML_TOK_PI:
  ------------------
  |  |   76|  16.9k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3185:5): [True: 16.9k, False: 4.56M]
  ------------------
 3186|  16.9k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3186:11): [True: 0, False: 16.9k]
  ------------------
 3187|      0|        return XML_ERROR_NO_MEMORY;
 3188|  16.9k|      break;
 3189|  16.9k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|  1.00k|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3189:5): [True: 1.00k, False: 4.57M]
  ------------------
 3190|  1.00k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3190:11): [True: 0, False: 1.00k]
  ------------------
 3191|      0|        return XML_ERROR_NO_MEMORY;
 3192|  1.00k|      break;
 3193|  1.00k|    default:
  ------------------
  |  Branch (3193:5): [True: 0, False: 4.57M]
  ------------------
 3194|       |      /* All of the tokens produced by XmlContentTok() have their own
 3195|       |       * explicit cases, so this default is not strictly necessary.
 3196|       |       * However it is a useful safety net, so we retain the code and
 3197|       |       * simply exclude it from the coverage tests.
 3198|       |       *
 3199|       |       * LCOV_EXCL_START
 3200|       |       */
 3201|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3201:11): [True: 0, False: 0]
  ------------------
 3202|      0|        reportDefault(parser, enc, s, next);
 3203|      0|      break;
 3204|       |      /* LCOV_EXCL_STOP */
 3205|  4.57M|    }
 3206|  4.48M|    *eventPP = s = next;
 3207|  4.48M|    switch (parser->m_parsingStatus.parsing) {
 3208|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3208:5): [True: 0, False: 4.48M]
  ------------------
 3209|      0|      *nextPtr = next;
 3210|      0|      return XML_ERROR_NONE;
 3211|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3211:5): [True: 0, False: 4.48M]
  ------------------
 3212|      0|      return XML_ERROR_ABORTED;
 3213|  4.48M|    default:;
  ------------------
  |  Branch (3213:5): [True: 4.48M, False: 0]
  ------------------
 3214|  4.48M|    }
 3215|  4.48M|  }
 3216|       |  /* not reached */
 3217|  97.1k|}
xmlparse.c:hashTableIterInit:
 7159|  16.6k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7160|  16.6k|  iter->p = table->v;
 7161|  16.6k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7161:15): [True: 8.69k, False: 7.96k]
  ------------------
 7162|  16.6k|}
xmlparse.c:hashTableIterNext:
 7165|  36.2k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7166|   593k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7166:10): [True: 576k, False: 16.6k]
  ------------------
 7167|   576k|    NAMED *tem = *(iter->p)++;
 7168|   576k|    if (tem)
  ------------------
  |  Branch (7168:9): [True: 19.6k, False: 557k]
  ------------------
 7169|  19.6k|      return tem;
 7170|   576k|  }
 7171|  16.6k|  return NULL;
 7172|  36.2k|}
xmlparse.c:storeAtts:
 3254|  3.63M|          enum XML_Account account) {
 3255|  3.63M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3256|  3.63M|  ELEMENT_TYPE *elementType;
 3257|  3.63M|  int nDefaultAtts;
 3258|  3.63M|  const XML_Char **appAtts; /* the attribute list for the application */
 3259|  3.63M|  int attIndex = 0;
 3260|  3.63M|  int prefixLen;
 3261|  3.63M|  int i;
 3262|  3.63M|  int n;
 3263|  3.63M|  XML_Char *uri;
 3264|  3.63M|  int nPrefixes = 0;
 3265|  3.63M|  BINDING *binding;
 3266|  3.63M|  const XML_Char *localPart;
 3267|       |
 3268|       |  /* lookup the element type name */
 3269|  3.63M|  elementType
 3270|  3.63M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3271|  3.63M|  if (! elementType) {
  ------------------
  |  Branch (3271:7): [True: 11.5k, False: 3.61M]
  ------------------
 3272|  11.5k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3273|  11.5k|    if (! name)
  ------------------
  |  Branch (3273:9): [True: 0, False: 11.5k]
  ------------------
 3274|      0|      return XML_ERROR_NO_MEMORY;
 3275|  11.5k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3276|  11.5k|                                         sizeof(ELEMENT_TYPE));
 3277|  11.5k|    if (! elementType)
  ------------------
  |  Branch (3277:9): [True: 0, False: 11.5k]
  ------------------
 3278|      0|      return XML_ERROR_NO_MEMORY;
 3279|  11.5k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3279:9): [True: 0, False: 11.5k]
  |  Branch (3279:25): [True: 0, False: 0]
  ------------------
 3280|      0|      return XML_ERROR_NO_MEMORY;
 3281|  11.5k|  }
 3282|  3.63M|  nDefaultAtts = elementType->nDefaultAtts;
 3283|       |
 3284|       |  /* get the attributes from the tokenizer */
 3285|  3.63M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  3.63M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3286|       |
 3287|       |  /* Detect and prevent integer overflow */
 3288|  3.63M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3288:7): [True: 0, False: 3.63M]
  ------------------
 3289|      0|    return XML_ERROR_NO_MEMORY;
 3290|      0|  }
 3291|       |
 3292|  3.63M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3292:7): [True: 308, False: 3.63M]
  ------------------
 3293|    308|    int oldAttsSize = parser->m_attsSize;
 3294|    308|    ATTRIBUTE *temp;
 3295|       |#ifdef XML_ATTR_INFO
 3296|       |    XML_AttrInfo *temp2;
 3297|       |#endif
 3298|       |
 3299|       |    /* Detect and prevent integer overflow */
 3300|    308|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  244|    308|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:9): [True: 0, False: 308]
  ------------------
 3301|    308|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  244|    308|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3301:12): [True: 0, False: 308]
  ------------------
 3302|      0|      return XML_ERROR_NO_MEMORY;
 3303|      0|    }
 3304|       |
 3305|    308|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  244|    308|#define INIT_ATTS_SIZE 16
  ------------------
 3306|       |
 3307|       |    /* Detect and prevent integer overflow.
 3308|       |     * The preprocessor guard addresses the "always false" warning
 3309|       |     * from -Wtype-limits on platforms where
 3310|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3311|       |#if UINT_MAX >= SIZE_MAX
 3312|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3313|       |      parser->m_attsSize = oldAttsSize;
 3314|       |      return XML_ERROR_NO_MEMORY;
 3315|       |    }
 3316|       |#endif
 3317|       |
 3318|    308|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  715|    308|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3319|    308|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3320|    308|    if (temp == NULL) {
  ------------------
  |  Branch (3320:9): [True: 0, False: 308]
  ------------------
 3321|      0|      parser->m_attsSize = oldAttsSize;
 3322|      0|      return XML_ERROR_NO_MEMORY;
 3323|      0|    }
 3324|    308|    parser->m_atts = temp;
 3325|       |#ifdef XML_ATTR_INFO
 3326|       |    /* Detect and prevent integer overflow.
 3327|       |     * The preprocessor guard addresses the "always false" warning
 3328|       |     * from -Wtype-limits on platforms where
 3329|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3330|       |#  if UINT_MAX >= SIZE_MAX
 3331|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3332|       |      parser->m_attsSize = oldAttsSize;
 3333|       |      return XML_ERROR_NO_MEMORY;
 3334|       |    }
 3335|       |#  endif
 3336|       |
 3337|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3338|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3339|       |    if (temp2 == NULL) {
 3340|       |      parser->m_attsSize = oldAttsSize;
 3341|       |      return XML_ERROR_NO_MEMORY;
 3342|       |    }
 3343|       |    parser->m_attInfo = temp2;
 3344|       |#endif
 3345|    308|    if (n > oldAttsSize)
  ------------------
  |  Branch (3345:9): [True: 290, False: 18]
  ------------------
 3346|    290|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    290|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3347|    308|  }
 3348|       |
 3349|  3.63M|  appAtts = (const XML_Char **)parser->m_atts;
 3350|  3.64M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3350:15): [True: 14.9k, False: 3.63M]
  ------------------
 3351|  14.9k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3352|       |#ifdef XML_ATTR_INFO
 3353|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3354|       |#endif
 3355|       |    /* add the name and value to the attribute list */
 3356|  14.9k|    ATTRIBUTE_ID *attId
 3357|  14.9k|        = getAttributeId(parser, enc, currAtt->name,
 3358|  14.9k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  14.9k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3359|  14.9k|    if (! attId)
  ------------------
  |  Branch (3359:9): [True: 0, False: 14.9k]
  ------------------
 3360|      0|      return XML_ERROR_NO_MEMORY;
 3361|       |#ifdef XML_ATTR_INFO
 3362|       |    currAttInfo->nameStart
 3363|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3364|       |    currAttInfo->nameEnd
 3365|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3366|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3367|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3368|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3369|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3370|       |#endif
 3371|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3372|       |       namespace processing is turned on and different prefixes for the same
 3373|       |       namespace are used. For this case we have a check further down.
 3374|       |    */
 3375|  14.9k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3375:9): [True: 347, False: 14.6k]
  ------------------
 3376|    347|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3376:11): [True: 346, False: 1]
  ------------------
 3377|    346|        parser->m_eventPtr = parser->m_atts[i].name;
 3378|    347|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3379|    347|    }
 3380|  14.6k|    (attId->name)[-1] = 1;
 3381|  14.6k|    appAtts[attIndex++] = attId->name;
 3382|  14.6k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3382:9): [True: 8.54k, False: 6.10k]
  ------------------
 3383|  8.54k|      enum XML_Error result;
 3384|  8.54k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  8.54k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3385|       |
 3386|       |      /* figure out whether declared as other than CDATA */
 3387|  8.54k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3387:11): [True: 689, False: 7.85k]
  ------------------
 3388|    689|        int j;
 3389|  94.6k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3389:21): [True: 94.3k, False: 263]
  ------------------
 3390|  94.3k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3390:15): [True: 426, False: 93.9k]
  ------------------
 3391|    426|            isCdata = elementType->defaultAtts[j].isCdata;
 3392|    426|            break;
 3393|    426|          }
 3394|  94.3k|        }
 3395|    689|      }
 3396|       |
 3397|       |      /* normalize the attribute value */
 3398|  8.54k|      result = storeAttributeValue(
 3399|  8.54k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3400|  8.54k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3401|  8.54k|      if (result)
  ------------------
  |  Branch (3401:11): [True: 154, False: 8.39k]
  ------------------
 3402|    154|        return result;
 3403|  8.39k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|  8.39k|#define poolStart(pool) ((pool)->start)
  ------------------
 3404|  8.39k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  8.39k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3405|  8.39k|    } else {
 3406|       |      /* the value did not need normalizing */
 3407|  6.10k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3408|  6.10k|                                          parser->m_atts[i].valuePtr,
 3409|  6.10k|                                          parser->m_atts[i].valueEnd);
 3410|  6.10k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3410:11): [True: 0, False: 6.10k]
  ------------------
 3411|      0|        return XML_ERROR_NO_MEMORY;
 3412|  6.10k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  6.10k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3413|  6.10k|    }
 3414|       |    /* handle prefixed attribute names */
 3415|  14.4k|    if (attId->prefix) {
  ------------------
  |  Branch (3415:9): [True: 0, False: 14.4k]
  ------------------
 3416|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3416:11): [True: 0, False: 0]
  ------------------
 3417|       |        /* deal with namespace declarations here */
 3418|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3419|      0|                                           appAtts[attIndex], bindingsPtr);
 3420|      0|        if (result)
  ------------------
  |  Branch (3420:13): [True: 0, False: 0]
  ------------------
 3421|      0|          return result;
 3422|      0|        --attIndex;
 3423|      0|      } else {
 3424|       |        /* deal with other prefixed names later */
 3425|      0|        attIndex++;
 3426|      0|        nPrefixes++;
 3427|      0|        (attId->name)[-1] = 2;
 3428|      0|      }
 3429|      0|    } else
 3430|  14.4k|      attIndex++;
 3431|  14.4k|  }
 3432|       |
 3433|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3434|  3.63M|  parser->m_nSpecifiedAtts = attIndex;
 3435|  3.63M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3435:7): [True: 342, False: 3.63M]
  |  Branch (3435:29): [True: 119, False: 223]
  ------------------
 3436|    211|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3436:17): [True: 211, False: 0]
  ------------------
 3437|    211|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3437:11): [True: 119, False: 92]
  ------------------
 3438|    119|        parser->m_idAttIndex = i;
 3439|    119|        break;
 3440|    119|      }
 3441|    119|  } else
 3442|  3.63M|    parser->m_idAttIndex = -1;
 3443|       |
 3444|       |  /* do attribute defaulting */
 3445|  3.77M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3445:15): [True: 141k, False: 3.63M]
  ------------------
 3446|   141k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3447|   141k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3447:9): [True: 141k, False: 461]
  |  Branch (3447:33): [True: 228, False: 140k]
  ------------------
 3448|    228|      if (da->id->prefix) {
  ------------------
  |  Branch (3448:11): [True: 0, False: 228]
  ------------------
 3449|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3449:13): [True: 0, False: 0]
  ------------------
 3450|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3451|      0|                                             da->value, bindingsPtr);
 3452|      0|          if (result)
  ------------------
  |  Branch (3452:15): [True: 0, False: 0]
  ------------------
 3453|      0|            return result;
 3454|      0|        } else {
 3455|      0|          (da->id->name)[-1] = 2;
 3456|      0|          nPrefixes++;
 3457|      0|          appAtts[attIndex++] = da->id->name;
 3458|      0|          appAtts[attIndex++] = da->value;
 3459|      0|        }
 3460|    228|      } else {
 3461|    228|        (da->id->name)[-1] = 1;
 3462|    228|        appAtts[attIndex++] = da->id->name;
 3463|    228|        appAtts[attIndex++] = da->value;
 3464|    228|      }
 3465|    228|    }
 3466|   141k|  }
 3467|  3.63M|  appAtts[attIndex] = 0;
 3468|       |
 3469|       |  /* expand prefixed attribute names, check for duplicates,
 3470|       |     and clear flags that say whether attributes were specified */
 3471|  3.63M|  i = 0;
 3472|  3.63M|  if (nPrefixes) {
  ------------------
  |  Branch (3472:7): [True: 0, False: 3.63M]
  ------------------
 3473|      0|    int j; /* hash table index */
 3474|      0|    unsigned long version = parser->m_nsAttsVersion;
 3475|       |
 3476|       |    /* Detect and prevent invalid shift */
 3477|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3477:9): [True: 0, False: 0]
  ------------------
 3478|      0|      return XML_ERROR_NO_MEMORY;
 3479|      0|    }
 3480|       |
 3481|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3482|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3483|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3484|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3484:9): [True: 0, False: 0]
  ------------------
 3485|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3486|      0|      NS_ATT *temp;
 3487|       |      /* hash table size must also be a power of 2 and >= 8 */
 3488|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3488:14): [True: 0, False: 0]
  ------------------
 3489|      0|        ;
 3490|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3490:11): [True: 0, False: 0]
  ------------------
 3491|      0|        parser->m_nsAttsPower = 3;
 3492|       |
 3493|       |      /* Detect and prevent invalid shift */
 3494|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3494:11): [True: 0, False: 0]
  ------------------
 3495|       |        /* Restore actual size of memory in m_nsAtts */
 3496|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3497|      0|        return XML_ERROR_NO_MEMORY;
 3498|      0|      }
 3499|       |
 3500|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3501|       |
 3502|       |      /* Detect and prevent integer overflow.
 3503|       |       * The preprocessor guard addresses the "always false" warning
 3504|       |       * from -Wtype-limits on platforms where
 3505|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3506|       |#if UINT_MAX >= SIZE_MAX
 3507|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3508|       |        /* Restore actual size of memory in m_nsAtts */
 3509|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3510|       |        return XML_ERROR_NO_MEMORY;
 3511|       |      }
 3512|       |#endif
 3513|       |
 3514|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3515|      0|                               nsAttsSize * sizeof(NS_ATT));
 3516|      0|      if (! temp) {
  ------------------
  |  Branch (3516:11): [True: 0, False: 0]
  ------------------
 3517|       |        /* Restore actual size of memory in m_nsAtts */
 3518|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3519|      0|        return XML_ERROR_NO_MEMORY;
 3520|      0|      }
 3521|      0|      parser->m_nsAtts = temp;
 3522|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3523|      0|    }
 3524|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3525|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3525:9): [True: 0, False: 0]
  ------------------
 3526|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  245|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3527|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3527:28): [True: 0, False: 0]
  ------------------
 3528|      0|        parser->m_nsAtts[--j].version = version;
 3529|      0|    }
 3530|      0|    parser->m_nsAttsVersion = --version;
 3531|       |
 3532|       |    /* expand prefixed names and check for duplicates */
 3533|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3533:12): [True: 0, False: 0]
  ------------------
 3534|      0|      const XML_Char *s = appAtts[i];
 3535|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3535:11): [True: 0, False: 0]
  ------------------
 3536|      0|        ATTRIBUTE_ID *id;
 3537|      0|        const BINDING *b;
 3538|      0|        unsigned long uriHash;
 3539|      0|        struct siphash sip_state;
 3540|      0|        struct sipkey sip_key;
 3541|       |
 3542|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3543|      0|        sip24_init(&sip_state, &sip_key);
 3544|       |
 3545|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3546|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3547|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3547:13): [True: 0, False: 0]
  |  Branch (3547:21): [True: 0, False: 0]
  ------------------
 3548|       |          /* This code is walking through the appAtts array, dealing
 3549|       |           * with (in this case) a prefixed attribute name.  To be in
 3550|       |           * the array, the attribute must have already been bound, so
 3551|       |           * has to have passed through the hash table lookup once
 3552|       |           * already.  That implies that an entry for it already
 3553|       |           * exists, so the lookup above will return a pointer to
 3554|       |           * already allocated memory.  There is no opportunaity for
 3555|       |           * the allocator to fail, so the condition above cannot be
 3556|       |           * fulfilled.
 3557|       |           *
 3558|       |           * Since it is difficult to be certain that the above
 3559|       |           * analysis is complete, we retain the test and merely
 3560|       |           * remove the code from coverage tests.
 3561|       |           */
 3562|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3563|      0|        }
 3564|      0|        b = id->prefix->binding;
 3565|      0|        if (! b)
  ------------------
  |  Branch (3565:13): [True: 0, False: 0]
  ------------------
 3566|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3567|       |
 3568|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3568:21): [True: 0, False: 0]
  ------------------
 3569|      0|          const XML_Char c = b->uri[j];
 3570|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3570:15): [True: 0, False: 0]
  ------------------
 3571|      0|            return XML_ERROR_NO_MEMORY;
 3572|      0|        }
 3573|       |
 3574|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3575|       |
 3576|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3576:16): [True: 0, False: 0]
  ------------------
 3577|      0|          ;
 3578|       |
 3579|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3580|       |
 3581|      0|        do { /* copies null terminator */
 3582|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3582:15): [True: 0, False: 0]
  ------------------
 3583|      0|            return XML_ERROR_NO_MEMORY;
 3584|      0|        } while (*s++);
  ------------------
  |  Branch (3584:18): [True: 0, False: 0]
  ------------------
 3585|       |
 3586|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3587|       |
 3588|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3589|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3590|       |          */
 3591|      0|          unsigned char step = 0;
 3592|      0|          unsigned long mask = nsAttsSize - 1;
 3593|      0|          j = uriHash & mask; /* index into hash table */
 3594|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3594:18): [True: 0, False: 0]
  ------------------
 3595|       |            /* for speed we compare stored hash values first */
 3596|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3596:17): [True: 0, False: 0]
  ------------------
 3597|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3598|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3599|       |              /* s1 is null terminated, but not s2 */
 3600|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3600:22): [True: 0, False: 0]
  |  Branch (3600:36): [True: 0, False: 0]
  ------------------
 3601|      0|                ;
 3602|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3602:19): [True: 0, False: 0]
  ------------------
 3603|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3604|      0|            }
 3605|      0|            if (! step)
  ------------------
  |  Branch (3605:17): [True: 0, False: 0]
  ------------------
 3606|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  235|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3607|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3607:13): [True: 0, False: 0]
  ------------------
 3608|      0|          }
 3609|      0|        }
 3610|       |
 3611|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3611:13): [True: 0, False: 0]
  ------------------
 3612|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3613|      0|          s = b->prefix->name;
 3614|      0|          do {
 3615|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3615:17): [True: 0, False: 0]
  ------------------
 3616|      0|              return XML_ERROR_NO_MEMORY;
 3617|      0|          } while (*s++);
  ------------------
  |  Branch (3617:20): [True: 0, False: 0]
  ------------------
 3618|      0|        }
 3619|       |
 3620|       |        /* store expanded name in attribute list */
 3621|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3622|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3623|      0|        appAtts[i] = s;
 3624|       |
 3625|       |        /* fill empty slot with new version, uriName and hash value */
 3626|      0|        parser->m_nsAtts[j].version = version;
 3627|      0|        parser->m_nsAtts[j].hash = uriHash;
 3628|      0|        parser->m_nsAtts[j].uriName = s;
 3629|       |
 3630|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3630:13): [True: 0, False: 0]
  ------------------
 3631|      0|          i += 2;
 3632|      0|          break;
 3633|      0|        }
 3634|      0|      } else                     /* not prefixed */
 3635|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3636|      0|    }
 3637|      0|  }
 3638|       |  /* clear flags for the remaining attributes */
 3639|  3.64M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3639:10): [True: 13.8k, False: 3.63M]
  ------------------
 3640|  13.8k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3641|  3.63M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3641:32): [True: 0, False: 3.63M]
  ------------------
 3642|      0|    binding->attId->name[-1] = 0;
 3643|       |
 3644|  3.63M|  if (! parser->m_ns)
  ------------------
  |  Branch (3644:7): [True: 3.63M, False: 0]
  ------------------
 3645|  3.63M|    return XML_ERROR_NONE;
 3646|       |
 3647|       |  /* expand the element type name */
 3648|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3648:7): [True: 0, False: 0]
  ------------------
 3649|      0|    binding = elementType->prefix->binding;
 3650|      0|    if (! binding)
  ------------------
  |  Branch (3650:9): [True: 0, False: 0]
  ------------------
 3651|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3652|      0|    localPart = tagNamePtr->str;
 3653|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3653:12): [True: 0, False: 0]
  ------------------
 3654|      0|      ;
 3655|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3655:14): [True: 0, False: 0]
  ------------------
 3656|      0|    binding = dtd->defaultPrefix.binding;
 3657|      0|    localPart = tagNamePtr->str;
 3658|      0|  } else
 3659|      0|    return XML_ERROR_NONE;
 3660|      0|  prefixLen = 0;
 3661|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3661:7): [True: 0, False: 0]
  |  Branch (3661:32): [True: 0, False: 0]
  ------------------
 3662|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3662:12): [True: 0, False: 0]
  ------------------
 3663|      0|      ; /* prefixLen includes null terminator */
 3664|      0|  }
 3665|      0|  tagNamePtr->localPart = localPart;
 3666|      0|  tagNamePtr->uriLen = binding->uriLen;
 3667|      0|  tagNamePtr->prefix = binding->prefix->name;
 3668|      0|  tagNamePtr->prefixLen = prefixLen;
 3669|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3669:15): [True: 0, False: 0]
  ------------------
 3670|      0|    ; /* i includes null terminator */
 3671|       |
 3672|       |  /* Detect and prevent integer overflow */
 3673|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3673:7): [True: 0, False: 0]
  ------------------
 3674|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3674:10): [True: 0, False: 0]
  ------------------
 3675|      0|    return XML_ERROR_NO_MEMORY;
 3676|      0|  }
 3677|       |
 3678|      0|  n = i + binding->uriLen + prefixLen;
 3679|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3679:7): [True: 0, False: 0]
  ------------------
 3680|      0|    TAG *p;
 3681|       |
 3682|       |    /* Detect and prevent integer overflow */
 3683|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3683:9): [True: 0, False: 0]
  ------------------
 3684|      0|      return XML_ERROR_NO_MEMORY;
 3685|      0|    }
 3686|       |    /* Detect and prevent integer overflow.
 3687|       |     * The preprocessor guard addresses the "always false" warning
 3688|       |     * from -Wtype-limits on platforms where
 3689|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3690|       |#if UINT_MAX >= SIZE_MAX
 3691|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3692|       |      return XML_ERROR_NO_MEMORY;
 3693|       |    }
 3694|       |#endif
 3695|       |
 3696|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3697|      0|    if (! uri)
  ------------------
  |  Branch (3697:9): [True: 0, False: 0]
  ------------------
 3698|      0|      return XML_ERROR_NO_MEMORY;
 3699|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
 3700|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3701|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3701:34): [True: 0, False: 0]
  ------------------
 3702|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3702:11): [True: 0, False: 0]
  ------------------
 3703|      0|        p->name.str = uri;
 3704|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3705|      0|    binding->uri = uri;
 3706|      0|  }
 3707|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3708|      0|  uri = binding->uri + binding->uriLen;
 3709|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3710|       |  /* we always have a namespace separator between localPart and prefix */
 3711|      0|  if (prefixLen) {
  ------------------
  |  Branch (3711:7): [True: 0, False: 0]
  ------------------
 3712|      0|    uri += i - 1;
 3713|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3714|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3715|      0|  }
 3716|      0|  tagNamePtr->str = binding->uri;
 3717|      0|  return XML_ERROR_NONE;
 3718|      0|}
xmlparse.c:setElementTypePrefix:
 6447|  8.09k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6448|  8.09k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6449|  8.09k|  const XML_Char *name;
 6450|  87.7k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6450:34): [True: 85.0k, False: 2.72k]
  ------------------
 6451|  85.0k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|  85.0k|#  define XML_T(x) x
  ------------------
  |  Branch (6451:9): [True: 5.37k, False: 79.7k]
  ------------------
 6452|  5.37k|      PREFIX *prefix;
 6453|  5.37k|      const XML_Char *s;
 6454|  71.9k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6454:35): [True: 66.6k, False: 5.37k]
  ------------------
 6455|  66.6k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  603|  66.6k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 77, False: 66.5k]
  |  |  |  Branch (603:35): [True: 0, False: 77]
  |  |  ------------------
  |  |  604|  66.6k|       ? 0                                                                     \
  |  |  605|  66.6k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6455:13): [True: 0, False: 66.6k]
  ------------------
 6456|      0|          return 0;
 6457|  66.6k|      }
 6458|  5.37k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  5.37k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 12, False: 5.36k]
  |  |  |  Branch (603:35): [True: 0, False: 12]
  |  |  ------------------
  |  |  604|  5.37k|       ? 0                                                                     \
  |  |  605|  5.37k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6458:11): [True: 0, False: 5.37k]
  ------------------
 6459|      0|        return 0;
 6460|  5.37k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  596|  5.37k|#define poolStart(pool) ((pool)->start)
  ------------------
 6461|  5.37k|                                sizeof(PREFIX));
 6462|  5.37k|      if (! prefix)
  ------------------
  |  Branch (6462:11): [True: 0, False: 5.37k]
  ------------------
 6463|      0|        return 0;
 6464|  5.37k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|  5.37k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6464:11): [True: 4.88k, False: 485]
  ------------------
 6465|  4.88k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  4.88k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6466|    485|      else
 6467|    485|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    485|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6468|  5.37k|      elementType->prefix = prefix;
 6469|  5.37k|      break;
 6470|  5.37k|    }
 6471|  85.0k|  }
 6472|  8.09k|  return 1;
 6473|  8.09k|}
xmlparse.c:freeBindings:
 3224|  9.09k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3225|  9.09k|  while (bindings) {
  ------------------
  |  Branch (3225:10): [True: 0, False: 9.09k]
  ------------------
 3226|      0|    BINDING *b = bindings;
 3227|       |
 3228|       |    /* m_startNamespaceDeclHandler will have been called for this
 3229|       |     * binding in addBindings(), so call the end handler now.
 3230|       |     */
 3231|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3231:9): [True: 0, False: 0]
  ------------------
 3232|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3233|       |
 3234|      0|    bindings = bindings->nextTagBinding;
 3235|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3236|      0|    parser->m_freeBindingList = b;
 3237|      0|    b->prefix->binding = b->prevPrefixBinding;
 3238|      0|  }
 3239|  9.09k|}
xmlparse.c:epilogProcessor:
 5647|    123|                const char **nextPtr) {
 5648|    123|  parser->m_processor = epilogProcessor;
 5649|    123|  parser->m_eventPtr = s;
 5650|    581|  for (;;) {
 5651|    581|    const char *next = NULL;
 5652|    581|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|    581|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|    581|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5653|    581|#ifdef XML_DTD
 5654|    581|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5654:9): [True: 0, False: 581]
  ------------------
 5655|    581|                                  XML_ACCOUNT_DIRECT)) {
 5656|      0|      accountingOnAbort(parser);
 5657|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5658|      0|    }
 5659|    581|#endif
 5660|    581|    parser->m_eventEndPtr = next;
 5661|    581|    switch (tok) {
 5662|       |    /* report partial linebreak - it might be the last token */
 5663|      1|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      1|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5663:5): [True: 1, False: 580]
  ------------------
 5664|      1|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5664:11): [True: 0, False: 1]
  ------------------
 5665|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5666|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5666:13): [True: 0, False: 0]
  ------------------
 5667|      0|          return XML_ERROR_ABORTED;
 5668|      0|      }
 5669|      1|      *nextPtr = next;
 5670|      1|      return XML_ERROR_NONE;
 5671|     40|    case XML_TOK_NONE:
  ------------------
  |  |   51|     40|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5671:5): [True: 40, False: 541]
  ------------------
 5672|     40|      *nextPtr = s;
 5673|     40|      return XML_ERROR_NONE;
 5674|    217|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    217|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5674:5): [True: 217, False: 364]
  ------------------
 5675|    217|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5675:11): [True: 0, False: 217]
  ------------------
 5676|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5677|    217|      break;
 5678|    163|    case XML_TOK_PI:
  ------------------
  |  |   76|    163|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5678:5): [True: 163, False: 418]
  ------------------
 5679|    163|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5679:11): [True: 0, False: 163]
  ------------------
 5680|      0|        return XML_ERROR_NO_MEMORY;
 5681|    163|      break;
 5682|    163|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|     78|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5682:5): [True: 78, False: 503]
  ------------------
 5683|     78|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5683:11): [True: 0, False: 78]
  ------------------
 5684|      0|        return XML_ERROR_NO_MEMORY;
 5685|     78|      break;
 5686|     78|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5686:5): [True: 20, False: 561]
  ------------------
 5687|     20|      parser->m_eventPtr = next;
 5688|     20|      return XML_ERROR_INVALID_TOKEN;
 5689|      6|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5689:5): [True: 6, False: 575]
  ------------------
 5690|      6|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5690:11): [True: 6, False: 0]
  ------------------
 5691|      6|        *nextPtr = s;
 5692|      6|        return XML_ERROR_NONE;
 5693|      6|      }
 5694|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5695|      1|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5695:5): [True: 1, False: 580]
  ------------------
 5696|      1|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5696:11): [True: 1, False: 0]
  ------------------
 5697|      1|        *nextPtr = s;
 5698|      1|        return XML_ERROR_NONE;
 5699|      1|      }
 5700|      0|      return XML_ERROR_PARTIAL_CHAR;
 5701|     55|    default:
  ------------------
  |  Branch (5701:5): [True: 55, False: 526]
  ------------------
 5702|     55|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5703|    581|    }
 5704|    458|    parser->m_eventPtr = s = next;
 5705|    458|    switch (parser->m_parsingStatus.parsing) {
 5706|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5706:5): [True: 0, False: 458]
  ------------------
 5707|      0|      *nextPtr = next;
 5708|      0|      return XML_ERROR_NONE;
 5709|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5709:5): [True: 0, False: 458]
  ------------------
 5710|      0|      return XML_ERROR_ABORTED;
 5711|    458|    default:;
  ------------------
  |  Branch (5711:5): [True: 458, False: 0]
  ------------------
 5712|    458|    }
 5713|    458|  }
 5714|    123|}
xmlparse.c:doCdataSection:
 4027|  51.6k|               enum XML_Account account) {
 4028|  51.6k|  const char *s = *startPtr;
 4029|  51.6k|  const char **eventPP;
 4030|  51.6k|  const char **eventEndPP;
 4031|  51.6k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4031:7): [True: 2.11k, False: 49.5k]
  ------------------
 4032|  2.11k|    eventPP = &parser->m_eventPtr;
 4033|  2.11k|    *eventPP = s;
 4034|  2.11k|    eventEndPP = &parser->m_eventEndPtr;
 4035|  49.5k|  } else {
 4036|  49.5k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4037|  49.5k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4038|  49.5k|  }
 4039|  51.6k|  *eventPP = s;
 4040|  51.6k|  *startPtr = NULL;
 4041|       |
 4042|  3.54M|  for (;;) {
 4043|  3.54M|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4044|  3.54M|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|  3.54M|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  3.54M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4045|  3.54M|#ifdef XML_DTD
 4046|  3.54M|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4046:9): [True: 3, False: 3.54M]
  ------------------
 4047|      3|      accountingOnAbort(parser);
 4048|      3|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4049|      3|    }
 4050|       |#else
 4051|       |    UNUSED_P(account);
 4052|       |#endif
 4053|  3.54M|    *eventEndPP = next;
 4054|  3.54M|    switch (tok) {
 4055|  50.9k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  50.9k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4055:5): [True: 50.9k, False: 3.49M]
  ------------------
 4056|  50.9k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4056:11): [True: 0, False: 50.9k]
  ------------------
 4057|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4058|       |      /* BEGIN disabled code */
 4059|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4060|  50.9k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4060:16): [Folded - Ignored]
  |  Branch (4060:23): [True: 0, False: 0]
  ------------------
 4061|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4062|      0|                                       0);
 4063|       |      /* END disabled code */
 4064|  50.9k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4064:16): [True: 0, False: 50.9k]
  ------------------
 4065|      0|        reportDefault(parser, enc, s, next);
 4066|  50.9k|      *startPtr = next;
 4067|  50.9k|      *nextPtr = next;
 4068|  50.9k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4068:11): [True: 0, False: 50.9k]
  ------------------
 4069|      0|        return XML_ERROR_ABORTED;
 4070|  50.9k|      else
 4071|  50.9k|        return XML_ERROR_NONE;
 4072|   117k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   117k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4072:5): [True: 117k, False: 3.42M]
  ------------------
 4073|   117k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4073:11): [True: 0, False: 117k]
  ------------------
 4074|      0|        XML_Char c = 0xA;
 4075|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4076|   117k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4076:18): [True: 0, False: 117k]
  ------------------
 4077|      0|        reportDefault(parser, enc, s, next);
 4078|   117k|      break;
 4079|  3.37M|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  3.37M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4079:5): [True: 3.37M, False: 169k]
  ------------------
 4080|  3.37M|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4081|  3.37M|      if (charDataHandler) {
  ------------------
  |  Branch (4081:11): [True: 0, False: 3.37M]
  ------------------
 4082|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4083|      0|          for (;;) {
 4084|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4085|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4086|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4087|      0|            *eventEndPP = next;
 4088|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4089|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4090|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4090:17): [True: 0, False: 0]
  ------------------
 4091|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4091:20): [True: 0, False: 0]
  ------------------
 4092|      0|              break;
 4093|      0|            *eventPP = s;
 4094|      0|          }
 4095|      0|        } else
 4096|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4097|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4098|  3.37M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4098:18): [True: 0, False: 3.37M]
  ------------------
 4099|      0|        reportDefault(parser, enc, s, next);
 4100|  3.37M|    } break;
 4101|    143|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    143|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4101:5): [True: 143, False: 3.54M]
  ------------------
 4102|    143|      *eventPP = next;
 4103|    143|      return XML_ERROR_INVALID_TOKEN;
 4104|     81|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|     81|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4104:5): [True: 81, False: 3.54M]
  ------------------
 4105|     81|      if (haveMore) {
  ------------------
  |  Branch (4105:11): [True: 81, False: 0]
  ------------------
 4106|     81|        *nextPtr = s;
 4107|     81|        return XML_ERROR_NONE;
 4108|     81|      }
 4109|      0|      return XML_ERROR_PARTIAL_CHAR;
 4110|    136|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|    136|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4110:5): [True: 136, False: 3.54M]
  ------------------
 4111|    469|    case XML_TOK_NONE:
  ------------------
  |  |   51|    469|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4111:5): [True: 333, False: 3.54M]
  ------------------
 4112|    469|      if (haveMore) {
  ------------------
  |  Branch (4112:11): [True: 412, False: 57]
  ------------------
 4113|    412|        *nextPtr = s;
 4114|    412|        return XML_ERROR_NONE;
 4115|    412|      }
 4116|     57|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4117|      0|    default:
  ------------------
  |  Branch (4117:5): [True: 0, False: 3.54M]
  ------------------
 4118|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4119|       |       * explicit case, so this default case will never be executed.
 4120|       |       * We retain it as a safety net and exclude it from the coverage
 4121|       |       * statistics.
 4122|       |       *
 4123|       |       * LCOV_EXCL_START
 4124|       |       */
 4125|      0|      *eventPP = next;
 4126|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4127|       |      /* LCOV_EXCL_STOP */
 4128|  3.54M|    }
 4129|       |
 4130|  3.49M|    *eventPP = s = next;
 4131|  3.49M|    switch (parser->m_parsingStatus.parsing) {
 4132|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4132:5): [True: 0, False: 3.49M]
  ------------------
 4133|      0|      *nextPtr = next;
 4134|      0|      return XML_ERROR_NONE;
 4135|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4135:5): [True: 0, False: 3.49M]
  ------------------
 4136|      0|      return XML_ERROR_ABORTED;
 4137|  3.49M|    default:;
  ------------------
  |  Branch (4137:5): [True: 3.49M, False: 0]
  ------------------
 4138|  3.49M|    }
 4139|  3.49M|  }
 4140|       |  /* not reached */
 4141|  51.6k|}
xmlparse.c:storeRawNames:
 2572|  5.39k|storeRawNames(XML_Parser parser) {
 2573|  5.39k|  TAG *tag = parser->m_tagStack;
 2574|  29.2k|  while (tag) {
  ------------------
  |  Branch (2574:10): [True: 23.8k, False: 5.39k]
  ------------------
 2575|  23.8k|    int bufSize;
 2576|  23.8k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2577|  23.8k|    size_t rawNameLen;
 2578|  23.8k|    char *rawNameBuf = tag->buf + nameLen;
 2579|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2580|       |       at the first entry that has already been copied; everything
 2581|       |       below it in the stack is already been accounted for in a
 2582|       |       previous call to this function.
 2583|       |    */
 2584|  23.8k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2584:9): [True: 0, False: 23.8k]
  ------------------
 2585|      0|      break;
 2586|       |    /* For re-use purposes we need to ensure that the
 2587|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2588|       |    */
 2589|  23.8k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  197|  23.8k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2590|       |    /* Detect and prevent integer overflow. */
 2591|  23.8k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2591:9): [True: 0, False: 23.8k]
  ------------------
 2592|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2593|  23.8k|    bufSize = nameLen + (int)rawNameLen;
 2594|  23.8k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2594:9): [True: 394, False: 23.4k]
  ------------------
 2595|    394|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|    394|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2596|    394|      if (temp == NULL)
  ------------------
  |  Branch (2596:11): [True: 0, False: 394]
  ------------------
 2597|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2598|       |      /* if tag->name.str points to tag->buf (only when namespace
 2599|       |         processing is off) then we have to update it
 2600|       |      */
 2601|    394|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2601:11): [True: 394, False: 0]
  ------------------
 2602|    394|        tag->name.str = (XML_Char *)temp;
 2603|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2604|       |         then update it as well, since it will always point into tag->buf
 2605|       |      */
 2606|    394|      if (tag->name.localPart)
  ------------------
  |  Branch (2606:11): [True: 0, False: 394]
  ------------------
 2607|      0|        tag->name.localPart
 2608|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2609|    394|      tag->buf = temp;
 2610|    394|      tag->bufEnd = temp + bufSize;
 2611|    394|      rawNameBuf = temp + nameLen;
 2612|    394|    }
 2613|  23.8k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2614|  23.8k|    tag->rawName = rawNameBuf;
 2615|  23.8k|    tag = tag->parent;
 2616|  23.8k|  }
 2617|  5.39k|  return XML_TRUE;
  ------------------
  |  |   55|  5.39k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2618|  5.39k|}
xmlparse.c:getElementType:
 7615|  10.9k|               const char *end) {
 7616|  10.9k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7617|  10.9k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7618|  10.9k|  ELEMENT_TYPE *ret;
 7619|       |
 7620|  10.9k|  if (! name)
  ------------------
  |  Branch (7620:7): [True: 0, False: 10.9k]
  ------------------
 7621|      0|    return NULL;
 7622|  10.9k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7623|  10.9k|                               sizeof(ELEMENT_TYPE));
 7624|  10.9k|  if (! ret)
  ------------------
  |  Branch (7624:7): [True: 0, False: 10.9k]
  ------------------
 7625|      0|    return NULL;
 7626|  10.9k|  if (ret->name != name)
  ------------------
  |  Branch (7626:7): [True: 2.90k, False: 8.09k]
  ------------------
 7627|  2.90k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.90k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7628|  8.09k|  else {
 7629|  8.09k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  8.09k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7630|  8.09k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7630:9): [True: 0, False: 8.09k]
  ------------------
 7631|      0|      return NULL;
 7632|  8.09k|  }
 7633|  10.9k|  return ret;
 7634|  10.9k|}
xmlparse.c:getAttributeId:
 6477|  78.7k|               const char *end) {
 6478|  78.7k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6479|  78.7k|  ATTRIBUTE_ID *id;
 6480|  78.7k|  const XML_Char *name;
 6481|  78.7k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  78.7k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 265, False: 78.5k]
  |  |  |  Branch (603:35): [True: 0, False: 265]
  |  |  ------------------
  |  |  604|  78.7k|       ? 0                                                                     \
  |  |  605|  78.7k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6481:7): [True: 0, False: 78.7k]
  ------------------
 6482|      0|    return NULL;
 6483|  78.7k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6484|  78.7k|  if (! name)
  ------------------
  |  Branch (6484:7): [True: 0, False: 78.7k]
  ------------------
 6485|      0|    return NULL;
 6486|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6487|  78.7k|  ++name;
 6488|  78.7k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6489|  78.7k|                              sizeof(ATTRIBUTE_ID));
 6490|  78.7k|  if (! id)
  ------------------
  |  Branch (6490:7): [True: 0, False: 78.7k]
  ------------------
 6491|      0|    return NULL;
 6492|  78.7k|  if (id->name != name)
  ------------------
  |  Branch (6492:7): [True: 72.2k, False: 6.53k]
  ------------------
 6493|  72.2k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  72.2k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6494|  6.53k|  else {
 6495|  6.53k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  6.53k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6496|  6.53k|    if (! parser->m_ns)
  ------------------
  |  Branch (6496:9): [True: 6.53k, False: 0]
  ------------------
 6497|  6.53k|      ;
 6498|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:14): [True: 0, False: 0]
  |  Branch (6498:43): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  |  Branch (6499:46): [True: 0, False: 0]
  ------------------
 6500|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:17): [True: 0, False: 0]
  ------------------
 6501|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:18): [True: 0, False: 0]
  |  Branch (6501:44): [True: 0, False: 0]
  ------------------
 6502|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6502:11): [True: 0, False: 0]
  ------------------
 6503|      0|        id->prefix = &dtd->defaultPrefix;
 6504|      0|      else
 6505|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6506|      0|                                      sizeof(PREFIX));
 6507|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6508|      0|    } else {
 6509|      0|      int i;
 6510|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6510:19): [True: 0, False: 0]
  ------------------
 6511|       |        /* attributes without prefix are *not* in the default namespace */
 6512|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6512:13): [True: 0, False: 0]
  ------------------
 6513|      0|          int j;
 6514|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6514:23): [True: 0, False: 0]
  ------------------
 6515|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6515:17): [True: 0, False: 0]
  ------------------
 6516|      0|              return NULL;
 6517|      0|          }
 6518|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6518:15): [True: 0, False: 0]
  ------------------
 6519|      0|            return NULL;
 6520|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6521|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6522|      0|          if (! id->prefix)
  ------------------
  |  Branch (6522:15): [True: 0, False: 0]
  ------------------
 6523|      0|            return NULL;
 6524|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6524:15): [True: 0, False: 0]
  ------------------
 6525|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6526|      0|          else
 6527|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6528|      0|          break;
 6529|      0|        }
 6530|      0|      }
 6531|      0|    }
 6532|  6.53k|  }
 6533|  78.7k|  return id;
 6534|  78.7k|}
xmlparse.c:poolAppend:
 7221|  3.03M|           const char *end) {
 7222|  3.03M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7222:7): [True: 18.0k, False: 3.01M]
  |  Branch (7222:22): [True: 0, False: 18.0k]
  ------------------
 7223|      0|    return NULL;
 7224|  3.04M|  for (;;) {
 7225|  3.04M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|  3.04M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  3.04M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7226|  3.04M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7227|  3.04M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7227:9): [True: 3.03M, False: 10.9k]
  ------------------
 7228|  3.04M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7228:12): [True: 0, False: 10.9k]
  ------------------
 7229|  3.03M|      break;
 7230|  10.9k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7230:9): [True: 0, False: 10.9k]
  ------------------
 7231|      0|      return NULL;
 7232|  10.9k|  }
 7233|  3.03M|  return pool->start;
 7234|  3.03M|}
xmlparse.c:defineAttribute:
 6387|  63.0k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6388|  63.0k|  DEFAULT_ATTRIBUTE *att;
 6389|  63.0k|  if (value || isId) {
  ------------------
  |  Branch (6389:7): [True: 8.09k, False: 54.9k]
  |  Branch (6389:16): [True: 2.45k, False: 52.4k]
  ------------------
 6390|       |    /* The handling of default attributes gets messed up if we have
 6391|       |       a default which duplicates a non-default. */
 6392|  10.5k|    int i;
 6393|  79.8k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6393:17): [True: 77.5k, False: 2.23k]
  ------------------
 6394|  77.5k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6394:11): [True: 8.31k, False: 69.2k]
  ------------------
 6395|  8.31k|        return 1;
 6396|  2.23k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6396:9): [True: 828, False: 1.40k]
  |  Branch (6396:17): [True: 186, False: 642]
  |  Branch (6396:34): [True: 186, False: 0]
  ------------------
 6397|    186|      type->idAtt = attId;
 6398|  2.23k|  }
 6399|  54.7k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6399:7): [True: 925, False: 53.7k]
  ------------------
 6400|    925|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6400:9): [True: 639, False: 286]
  ------------------
 6401|    639|      type->allocDefaultAtts = 8;
 6402|    639|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  714|    639|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6403|    639|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6404|    639|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6404:11): [True: 0, False: 639]
  ------------------
 6405|      0|        type->allocDefaultAtts = 0;
 6406|      0|        return 0;
 6407|      0|      }
 6408|    639|    } else {
 6409|    286|      DEFAULT_ATTRIBUTE *temp;
 6410|       |
 6411|       |      /* Detect and prevent integer overflow */
 6412|    286|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6412:11): [True: 0, False: 286]
  ------------------
 6413|      0|        return 0;
 6414|      0|      }
 6415|       |
 6416|    286|      int count = type->allocDefaultAtts * 2;
 6417|       |
 6418|       |      /* Detect and prevent integer overflow.
 6419|       |       * The preprocessor guard addresses the "always false" warning
 6420|       |       * from -Wtype-limits on platforms where
 6421|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6422|       |#if UINT_MAX >= SIZE_MAX
 6423|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6424|       |        return 0;
 6425|       |      }
 6426|       |#endif
 6427|       |
 6428|    286|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  715|    286|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6429|    286|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6430|    286|      if (temp == NULL)
  ------------------
  |  Branch (6430:11): [True: 0, False: 286]
  ------------------
 6431|      0|        return 0;
 6432|    286|      type->allocDefaultAtts = count;
 6433|    286|      type->defaultAtts = temp;
 6434|    286|    }
 6435|    925|  }
 6436|  54.7k|  att = type->defaultAtts + type->nDefaultAtts;
 6437|  54.7k|  att->id = attId;
 6438|  54.7k|  att->value = value;
 6439|  54.7k|  att->isCdata = isCdata;
 6440|  54.7k|  if (! isCdata)
  ------------------
  |  Branch (6440:7): [True: 54.5k, False: 131]
  ------------------
 6441|  54.5k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  54.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6442|  54.7k|  type->nDefaultAtts += 1;
 6443|  54.7k|  return 1;
 6444|  54.7k|}
xmlparse.c:poolGrow:
 7322|  41.1k|poolGrow(STRING_POOL *pool) {
 7323|  41.1k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7323:7): [True: 16.1k, False: 25.0k]
  ------------------
 7324|  16.1k|    if (pool->start == 0) {
  ------------------
  |  Branch (7324:9): [True: 14.4k, False: 1.61k]
  ------------------
 7325|  14.4k|      pool->blocks = pool->freeBlocks;
 7326|  14.4k|      pool->freeBlocks = pool->freeBlocks->next;
 7327|  14.4k|      pool->blocks->next = NULL;
 7328|  14.4k|      pool->start = pool->blocks->s;
 7329|  14.4k|      pool->end = pool->start + pool->blocks->size;
 7330|  14.4k|      pool->ptr = pool->start;
 7331|  14.4k|      return XML_TRUE;
  ------------------
  |  |   55|  14.4k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7332|  14.4k|    }
 7333|  1.61k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7333:9): [True: 1.47k, False: 146]
  ------------------
 7334|  1.47k|      BLOCK *tem = pool->freeBlocks->next;
 7335|  1.47k|      pool->freeBlocks->next = pool->blocks;
 7336|  1.47k|      pool->blocks = pool->freeBlocks;
 7337|  1.47k|      pool->freeBlocks = tem;
 7338|  1.47k|      memcpy(pool->blocks->s, pool->start,
 7339|  1.47k|             (pool->end - pool->start) * sizeof(XML_Char));
 7340|  1.47k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7341|  1.47k|      pool->start = pool->blocks->s;
 7342|  1.47k|      pool->end = pool->start + pool->blocks->size;
 7343|  1.47k|      return XML_TRUE;
  ------------------
  |  |   55|  1.47k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7344|  1.47k|    }
 7345|  1.61k|  }
 7346|  25.1k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7346:7): [True: 10.6k, False: 14.5k]
  |  Branch (7346:23): [True: 7.21k, False: 3.44k]
  ------------------
 7347|  7.21k|    BLOCK *temp;
 7348|  7.21k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7349|  7.21k|    size_t bytesToAllocate;
 7350|       |
 7351|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7352|       |             to avoid dangling pointers: */
 7353|  7.21k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7354|       |
 7355|  7.21k|    if (blockSize < 0) {
  ------------------
  |  Branch (7355:9): [True: 0, False: 7.21k]
  ------------------
 7356|       |      /* This condition traps a situation where either more than
 7357|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7358|       |       * readily testable, since it is unlikely that an average
 7359|       |       * machine will have that much memory, so we exclude it from the
 7360|       |       * coverage statistics.
 7361|       |       */
 7362|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7363|      0|    }
 7364|       |
 7365|  7.21k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7366|  7.21k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7366:9): [True: 0, False: 7.21k]
  ------------------
 7367|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7368|       |
 7369|  7.21k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7370|  7.21k|                                           (unsigned)bytesToAllocate);
 7371|  7.21k|    if (temp == NULL)
  ------------------
  |  Branch (7371:9): [True: 0, False: 7.21k]
  ------------------
 7372|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7373|  7.21k|    pool->blocks = temp;
 7374|  7.21k|    pool->blocks->size = blockSize;
 7375|  7.21k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7376|  7.21k|    pool->start = pool->blocks->s;
 7377|  7.21k|    pool->end = pool->start + blockSize;
 7378|  17.9k|  } else {
 7379|  17.9k|    BLOCK *tem;
 7380|  17.9k|    int blockSize = (int)(pool->end - pool->start);
 7381|  17.9k|    size_t bytesToAllocate;
 7382|       |
 7383|  17.9k|    if (blockSize < 0) {
  ------------------
  |  Branch (7383:9): [True: 0, False: 17.9k]
  ------------------
 7384|       |      /* This condition traps a situation where either more than
 7385|       |       * INT_MAX bytes have already been allocated (which is prevented
 7386|       |       * by various pieces of program logic, not least this one, never
 7387|       |       * mind the unlikelihood of actually having that much memory) or
 7388|       |       * the pool control fields have been corrupted (which could
 7389|       |       * conceivably happen in an extremely buggy user handler
 7390|       |       * function).  Either way it isn't readily testable, so we
 7391|       |       * exclude it from the coverage statistics.
 7392|       |       */
 7393|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7394|      0|    }
 7395|       |
 7396|  17.9k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  246|  17.9k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7396:9): [True: 17.6k, False: 348]
  ------------------
 7397|  17.6k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  246|  17.6k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7398|    348|    else {
 7399|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7400|    348|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7400:11): [True: 0, False: 348]
  ------------------
 7401|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7402|      0|      }
 7403|    348|      blockSize *= 2;
 7404|    348|    }
 7405|       |
 7406|  17.9k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7407|  17.9k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7407:9): [True: 0, False: 17.9k]
  ------------------
 7408|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7409|       |
 7410|  17.9k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7411|  17.9k|    if (! tem)
  ------------------
  |  Branch (7411:9): [True: 0, False: 17.9k]
  ------------------
 7412|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7413|  17.9k|    tem->size = blockSize;
 7414|  17.9k|    tem->next = pool->blocks;
 7415|  17.9k|    pool->blocks = tem;
 7416|  17.9k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7416:9): [True: 3.13k, False: 14.8k]
  ------------------
 7417|  3.13k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7418|  17.9k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7419|  17.9k|    pool->start = tem->s;
 7420|  17.9k|    pool->end = tem->s + blockSize;
 7421|  17.9k|  }
 7422|  25.1k|  return XML_TRUE;
  ------------------
  |  |   55|  25.1k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7423|  25.1k|}
xmlparse.c:poolBytesToAllocateFor:
 7294|  25.1k|poolBytesToAllocateFor(int blockSize) {
 7295|       |  /* Unprotected math would be:
 7296|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7297|       |  **
 7298|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7299|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7300|       |  ** on top has no chance of making us accept a small non-negative number
 7301|       |  */
 7302|  25.1k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7303|       |
 7304|  25.1k|  if (blockSize <= 0)
  ------------------
  |  Branch (7304:7): [True: 0, False: 25.1k]
  ------------------
 7305|      0|    return 0;
 7306|       |
 7307|  25.1k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7307:7): [True: 0, False: 25.1k]
  ------------------
 7308|      0|    return 0;
 7309|       |
 7310|  25.1k|  {
 7311|  25.1k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7312|  25.1k|    const int bytesToAllocate
 7313|  25.1k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7314|  25.1k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7314:9): [True: 0, False: 25.1k]
  ------------------
 7315|      0|      return 0;
 7316|       |
 7317|  25.1k|    return (size_t)bytesToAllocate;
 7318|  25.1k|  }
 7319|  25.1k|}
xmlparse.c:storeAttributeValue:
 5872|  16.6k|                    enum XML_Account account) {
 5873|  16.6k|  enum XML_Error result
 5874|  16.6k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5875|  16.6k|  if (result)
  ------------------
  |  Branch (5875:7): [True: 183, False: 16.4k]
  ------------------
 5876|    183|    return result;
 5877|  16.4k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  597|  24.8k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (597:26): [True: 4.66k, False: 3.71k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  599|  4.66k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5877:7): [True: 8.37k, False: 8.11k]
  |  Branch (5877:40): [True: 563, False: 4.09k]
  ------------------
 5878|    563|    poolChop(pool);
  ------------------
  |  |  598|    563|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5879|  16.4k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  603|  16.4k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 643, False: 15.8k]
  |  |  |  Branch (603:35): [True: 0, False: 643]
  |  |  ------------------
  |  |  604|  16.4k|       ? 0                                                                     \
  |  |  605|  16.4k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5879:7): [True: 0, False: 16.4k]
  ------------------
 5880|      0|    return XML_ERROR_NO_MEMORY;
 5881|  16.4k|  return XML_ERROR_NONE;
 5882|  16.4k|}
xmlparse.c:appendAttributeValue:
 5887|   251k|                     enum XML_Account account) {
 5888|   251k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5889|       |#ifndef XML_DTD
 5890|       |  UNUSED_P(account);
 5891|       |#endif
 5892|       |
 5893|  69.9M|  for (;;) {
 5894|  69.9M|    const char *next
 5895|  69.9M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5896|  69.9M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|  69.9M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  69.9M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5897|  69.9M|#ifdef XML_DTD
 5898|  69.9M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5898:9): [True: 24, False: 69.9M]
  ------------------
 5899|     24|      accountingOnAbort(parser);
 5900|     24|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5901|     24|    }
 5902|  69.9M|#endif
 5903|  69.9M|    switch (tok) {
 5904|   251k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   251k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5904:5): [True: 251k, False: 69.6M]
  ------------------
 5905|   251k|      return XML_ERROR_NONE;
 5906|     13|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5906:5): [True: 13, False: 69.9M]
  ------------------
 5907|     13|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5907:11): [True: 11, False: 2]
  ------------------
 5908|     11|        parser->m_eventPtr = next;
 5909|     13|      return XML_ERROR_INVALID_TOKEN;
 5910|      5|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5910:5): [True: 5, False: 69.9M]
  ------------------
 5911|      5|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5911:11): [True: 4, False: 1]
  ------------------
 5912|      4|        parser->m_eventPtr = ptr;
 5913|      5|      return XML_ERROR_INVALID_TOKEN;
 5914|  4.52k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  4.52k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5914:5): [True: 4.52k, False: 69.9M]
  ------------------
 5915|  4.52k|      XML_Char buf[XML_ENCODE_MAX];
 5916|  4.52k|      int i;
 5917|  4.52k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  4.52k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5918|  4.52k|      if (n < 0) {
  ------------------
  |  Branch (5918:11): [True: 36, False: 4.48k]
  ------------------
 5919|     36|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5919:13): [True: 35, False: 1]
  ------------------
 5920|     35|          parser->m_eventPtr = ptr;
 5921|     36|        return XML_ERROR_BAD_CHAR_REF;
 5922|     36|      }
 5923|  4.48k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5923:11): [True: 2.36k, False: 2.11k]
  |  Branch (5923:24): [True: 367, False: 2.00k]
  ------------------
 5924|  4.48k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|    367|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|    322|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5924:15): [True: 45, False: 322]
  |  Branch (5924:40): [True: 228, False: 94]
  ------------------
 5925|    273|        break;
 5926|  4.21k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  4.21k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5927|       |      /* The XmlEncode() functions can never return 0 here.  That
 5928|       |       * error return happens if the code point passed in is either
 5929|       |       * negative or greater than or equal to 0x110000.  The
 5930|       |       * XmlCharRefNumber() functions will all return a number
 5931|       |       * strictly less than 0x110000 or a negative value if an error
 5932|       |       * occurred.  The negative value is intercepted above, so
 5933|       |       * XmlEncode() is never passed a value it might return an
 5934|       |       * error for.
 5935|       |       */
 5936|  14.5k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5936:19): [True: 10.3k, False: 4.21k]
  ------------------
 5937|  10.3k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  603|  10.3k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 403, False: 9.90k]
  |  |  |  Branch (603:35): [True: 0, False: 403]
  |  |  ------------------
  |  |  604|  10.3k|       ? 0                                                                     \
  |  |  605|  10.3k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5937:13): [True: 0, False: 10.3k]
  ------------------
 5938|      0|          return XML_ERROR_NO_MEMORY;
 5939|  10.3k|      }
 5940|  4.21k|    } break;
 5941|  2.46M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  2.46M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5941:5): [True: 2.46M, False: 67.4M]
  ------------------
 5942|  2.46M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5942:11): [True: 0, False: 2.46M]
  ------------------
 5943|      0|        return XML_ERROR_NO_MEMORY;
 5944|  2.46M|      break;
 5945|  2.46M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.96k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5945:5): [True: 1.96k, False: 69.9M]
  ------------------
 5946|  1.96k|      next = ptr + enc->minBytesPerChar;
 5947|       |      /* fall through */
 5948|   254k|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|   254k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5948:5): [True: 252k, False: 69.6M]
  ------------------
 5949|  66.9M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  66.9M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5949:5): [True: 66.6M, False: 3.22M]
  ------------------
 5950|  66.9M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|  63.8M|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|  63.8M|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5950:11): [True: 63.8M, False: 3.13M]
  |  Branch (5950:25): [True: 661, False: 63.8M]
  |  Branch (5950:50): [True: 63.7M, False: 100k]
  ------------------
 5951|  63.7M|        break;
 5952|  3.23M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  603|  3.23M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 1.80k, False: 3.22M]
  |  |  |  Branch (603:35): [True: 0, False: 1.80k]
  |  |  ------------------
  |  |  604|  3.23M|       ? 0                                                                     \
  |  |  605|  3.23M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5952:11): [True: 0, False: 3.23M]
  ------------------
 5953|      0|        return XML_ERROR_NO_MEMORY;
 5954|  3.23M|      break;
 5955|  3.23M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   248k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5955:5): [True: 248k, False: 69.6M]
  ------------------
 5956|   248k|      const XML_Char *name;
 5957|   248k|      ENTITY *entity;
 5958|   248k|      char checkEntityDecl;
 5959|   248k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   248k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5960|   248k|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5961|   248k|      if (ch) {
  ------------------
  |  Branch (5961:11): [True: 11.9k, False: 236k]
  ------------------
 5962|  11.9k|#ifdef XML_DTD
 5963|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5964|       |         *       so there is no amplification and hence recording without
 5965|       |         *       protection. */
 5966|  11.9k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5967|  11.9k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5968|  11.9k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5969|  11.9k|#endif /* XML_DTD */
 5970|  11.9k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  603|  11.9k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 271, False: 11.7k]
  |  |  |  Branch (603:35): [True: 0, False: 271]
  |  |  ------------------
  |  |  604|  11.9k|       ? 0                                                                     \
  |  |  605|  11.9k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5970:13): [True: 0, False: 11.9k]
  ------------------
 5971|      0|          return XML_ERROR_NO_MEMORY;
 5972|  11.9k|        break;
 5973|  11.9k|      }
 5974|   236k|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5975|   236k|                             ptr + enc->minBytesPerChar,
 5976|   236k|                             next - enc->minBytesPerChar);
 5977|   236k|      if (! name)
  ------------------
  |  Branch (5977:11): [True: 0, False: 236k]
  ------------------
 5978|      0|        return XML_ERROR_NO_MEMORY;
 5979|   236k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5980|   236k|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  600|   236k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5981|       |      /* First, determine if a check for an existing declaration is needed;
 5982|       |         if yes, check that the entity exists, and that it is internal.
 5983|       |      */
 5984|   236k|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5984:11): [True: 20.5k, False: 215k]
  ------------------
 5985|  20.5k|        checkEntityDecl =
 5986|  20.5k|#ifdef XML_DTD
 5987|  20.5k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5987:13): [True: 20.5k, False: 0]
  ------------------
 5988|  20.5k|#endif /* XML_DTD */
 5989|  20.5k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5989:13): [True: 20.5k, False: 0]
  |  Branch (5989:14): [True: 195, False: 20.3k]
  ------------------
 5990|  20.5k|                             : ! dtd->hasParamEntityRefs);
 5991|   215k|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5992|   215k|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5992:27): [True: 214k, False: 1.25k]
  |  Branch (5992:56): [True: 0, False: 1.25k]
  ------------------
 5993|   236k|      if (checkEntityDecl) {
  ------------------
  |  Branch (5993:11): [True: 235k, False: 1.25k]
  ------------------
 5994|   235k|        if (! entity)
  ------------------
  |  Branch (5994:13): [True: 98, False: 234k]
  ------------------
 5995|     98|          return XML_ERROR_UNDEFINED_ENTITY;
 5996|   234k|        else if (! entity->is_internal)
  ------------------
  |  Branch (5996:18): [True: 0, False: 234k]
  ------------------
 5997|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5998|   235k|      } else if (! entity) {
  ------------------
  |  Branch (5998:18): [True: 896, False: 359]
  ------------------
 5999|       |        /* Cannot report skipped entity here - see comments on
 6000|       |           parser->m_skippedEntityHandler.
 6001|       |        if (parser->m_skippedEntityHandler)
 6002|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6003|       |        */
 6004|       |        /* Cannot call the default handler because this would be
 6005|       |           out of sync with the call to the startElementHandler.
 6006|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6007|       |          reportDefault(parser, enc, ptr, next);
 6008|       |        */
 6009|    896|        break;
 6010|    896|      }
 6011|   235k|      if (entity->open) {
  ------------------
  |  Branch (6011:11): [True: 5, False: 235k]
  ------------------
 6012|      5|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6012:13): [True: 0, False: 5]
  ------------------
 6013|       |          /* It does not appear that this line can be executed.
 6014|       |           *
 6015|       |           * The "if (entity->open)" check catches recursive entity
 6016|       |           * definitions.  In order to be called with an open
 6017|       |           * entity, it must have gone through this code before and
 6018|       |           * been through the recursive call to
 6019|       |           * appendAttributeValue() some lines below.  That call
 6020|       |           * sets the local encoding ("enc") to the parser's
 6021|       |           * internal encoding (internal_utf8 or internal_utf16),
 6022|       |           * which can never be the same as the principle encoding.
 6023|       |           * It doesn't appear there is another code path that gets
 6024|       |           * here with entity->open being TRUE.
 6025|       |           *
 6026|       |           * Since it is not certain that this logic is watertight,
 6027|       |           * we keep the line and merely exclude it from coverage
 6028|       |           * tests.
 6029|       |           */
 6030|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6031|      0|        }
 6032|      5|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6033|      5|      }
 6034|   235k|      if (entity->notation) {
  ------------------
  |  Branch (6034:11): [True: 0, False: 235k]
  ------------------
 6035|      0|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6035:13): [True: 0, False: 0]
  ------------------
 6036|      0|          parser->m_eventPtr = ptr;
 6037|      0|        return XML_ERROR_BINARY_ENTITY_REF;
 6038|      0|      }
 6039|   235k|      if (! entity->textPtr) {
  ------------------
  |  Branch (6039:11): [True: 2, False: 235k]
  ------------------
 6040|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6040:13): [True: 1, False: 1]
  ------------------
 6041|      1|          parser->m_eventPtr = ptr;
 6042|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6043|   235k|      } else {
 6044|   235k|        enum XML_Error result;
 6045|   235k|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6046|   235k|        entity->open = XML_TRUE;
  ------------------
  |  |   55|   235k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6047|   235k|#ifdef XML_DTD
 6048|   235k|        entityTrackingOnOpen(parser, entity, __LINE__);
 6049|   235k|#endif
 6050|   235k|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6051|   235k|                                      isCdata, (const char *)entity->textPtr,
 6052|   235k|                                      (const char *)textEnd, pool,
 6053|   235k|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6054|   235k|#ifdef XML_DTD
 6055|   235k|        entityTrackingOnClose(parser, entity, __LINE__);
 6056|   235k|#endif
 6057|   235k|        entity->open = XML_FALSE;
  ------------------
  |  |   56|   235k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6058|   235k|        if (result)
  ------------------
  |  Branch (6058:13): [True: 43, False: 235k]
  ------------------
 6059|     43|          return result;
 6060|   235k|      }
 6061|   235k|    } break;
 6062|   235k|    default:
  ------------------
  |  Branch (6062:5): [True: 0, False: 69.9M]
  ------------------
 6063|       |      /* The only token returned by XmlAttributeValueTok() that does
 6064|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6065|       |       * Getting that would require an entity name to contain an
 6066|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6067|       |       * tokenisers will have already recognised and rejected such
 6068|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6069|       |       * default case should be retained as a safety net, but the code
 6070|       |       * excluded from coverage tests.
 6071|       |       *
 6072|       |       * LCOV_EXCL_START
 6073|       |       */
 6074|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6074:11): [True: 0, False: 0]
  ------------------
 6075|      0|        parser->m_eventPtr = ptr;
 6076|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6077|       |      /* LCOV_EXCL_STOP */
 6078|  69.9M|    }
 6079|  69.6M|    ptr = next;
 6080|  69.6M|  }
 6081|       |  /* not reached */
 6082|   251k|}
xmlparse.c:storeEntityValue:
 6087|  5.89k|                 enum XML_Account account) {
 6088|  5.89k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6089|  5.89k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6090|  5.89k|  enum XML_Error result = XML_ERROR_NONE;
 6091|  5.89k|#ifdef XML_DTD
 6092|  5.89k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6093|  5.89k|  parser->m_prologState.inEntityValue = 1;
 6094|       |#else
 6095|       |  UNUSED_P(account);
 6096|       |#endif /* XML_DTD */
 6097|       |  /* never return Null for the value argument in EntityDeclHandler,
 6098|       |     since this would indicate an external entity; therefore we
 6099|       |     have to make sure that entityValuePool.start is not null */
 6100|  5.89k|  if (! pool->blocks) {
  ------------------
  |  Branch (6100:7): [True: 2.00k, False: 3.89k]
  ------------------
 6101|  2.00k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6101:9): [True: 0, False: 2.00k]
  ------------------
 6102|      0|      return XML_ERROR_NO_MEMORY;
 6103|  2.00k|  }
 6104|       |
 6105|   777k|  for (;;) {
 6106|   777k|    const char *next
 6107|   777k|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6108|   777k|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|   777k|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|   777k|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6109|       |
 6110|   777k|#ifdef XML_DTD
 6111|   777k|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6111:9): [True: 0, False: 777k]
  ------------------
 6112|   777k|                                  account)) {
 6113|      0|      accountingOnAbort(parser);
 6114|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6115|      0|      goto endEntityValue;
 6116|      0|    }
 6117|   777k|#endif
 6118|       |
 6119|   777k|    switch (tok) {
 6120|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6120:5): [True: 2, False: 777k]
  ------------------
 6121|      2|#ifdef XML_DTD
 6122|      2|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6122:11): [True: 0, False: 2]
  |  Branch (6122:38): [True: 0, False: 2]
  ------------------
 6123|      0|        const XML_Char *name;
 6124|      0|        ENTITY *entity;
 6125|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6126|      0|                               entityTextPtr + enc->minBytesPerChar,
 6127|      0|                               next - enc->minBytesPerChar);
 6128|      0|        if (! name) {
  ------------------
  |  Branch (6128:13): [True: 0, False: 0]
  ------------------
 6129|      0|          result = XML_ERROR_NO_MEMORY;
 6130|      0|          goto endEntityValue;
 6131|      0|        }
 6132|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6133|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6134|      0|        if (! entity) {
  ------------------
  |  Branch (6134:13): [True: 0, False: 0]
  ------------------
 6135|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6136|       |          /* cannot report skipped entity here - see comments on
 6137|       |             parser->m_skippedEntityHandler
 6138|       |          if (parser->m_skippedEntityHandler)
 6139|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6140|       |          */
 6141|      0|          dtd->keepProcessing = dtd->standalone;
 6142|      0|          goto endEntityValue;
 6143|      0|        }
 6144|      0|        if (entity->open) {
  ------------------
  |  Branch (6144:13): [True: 0, False: 0]
  ------------------
 6145|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6145:15): [True: 0, False: 0]
  ------------------
 6146|      0|            parser->m_eventPtr = entityTextPtr;
 6147|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6148|      0|          goto endEntityValue;
 6149|      0|        }
 6150|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6150:13): [True: 0, False: 0]
  ------------------
 6151|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6151:15): [True: 0, False: 0]
  ------------------
 6152|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6153|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6154|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6155|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6155:17): [True: 0, False: 0]
  ------------------
 6156|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6157|      0|                    entity->systemId, entity->publicId)) {
 6158|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6159|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6160|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6161|      0|              goto endEntityValue;
 6162|      0|            }
 6163|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6164|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6165|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6165:17): [True: 0, False: 0]
  ------------------
 6166|      0|              dtd->keepProcessing = dtd->standalone;
 6167|      0|          } else
 6168|      0|            dtd->keepProcessing = dtd->standalone;
 6169|      0|        } else {
 6170|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6171|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6172|      0|          result = storeEntityValue(
 6173|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6174|      0|              (const char *)(entity->textPtr + entity->textLen),
 6175|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6176|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6177|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6178|      0|          if (result)
  ------------------
  |  Branch (6178:15): [True: 0, False: 0]
  ------------------
 6179|      0|            goto endEntityValue;
 6180|      0|        }
 6181|      0|        break;
 6182|      0|      }
 6183|      2|#endif /* XML_DTD */
 6184|       |      /* In the internal subset, PE references are not legal
 6185|       |         within markup declarations, e.g entity values in this case. */
 6186|      2|      parser->m_eventPtr = entityTextPtr;
 6187|      2|      result = XML_ERROR_PARAM_ENTITY_REF;
 6188|      2|      goto endEntityValue;
 6189|  5.83k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  5.83k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6189:5): [True: 5.83k, False: 771k]
  ------------------
 6190|  5.83k|      result = XML_ERROR_NONE;
 6191|  5.83k|      goto endEntityValue;
 6192|  10.5k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  10.5k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6192:5): [True: 10.5k, False: 767k]
  ------------------
 6193|   101k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   101k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6193:5): [True: 91.2k, False: 686k]
  ------------------
 6194|   101k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6194:11): [True: 0, False: 101k]
  ------------------
 6195|      0|        result = XML_ERROR_NO_MEMORY;
 6196|      0|        goto endEntityValue;
 6197|      0|      }
 6198|   101k|      break;
 6199|   101k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|    863|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6199:5): [True: 863, False: 776k]
  ------------------
 6200|    863|      next = entityTextPtr + enc->minBytesPerChar;
 6201|       |      /* fall through */
 6202|   664k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   664k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6202:5): [True: 663k, False: 113k]
  ------------------
 6203|   664k|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6203:11): [True: 62, False: 664k]
  |  Branch (6203:37): [True: 0, False: 62]
  ------------------
 6204|      0|        result = XML_ERROR_NO_MEMORY;
 6205|      0|        goto endEntityValue;
 6206|      0|      }
 6207|   664k|      *(pool->ptr)++ = 0xA;
 6208|   664k|      break;
 6209|  5.42k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  5.42k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6209:5): [True: 5.42k, False: 772k]
  ------------------
 6210|  5.42k|      XML_Char buf[XML_ENCODE_MAX];
 6211|  5.42k|      int i;
 6212|  5.42k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  5.42k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6213|  5.42k|      if (n < 0) {
  ------------------
  |  Branch (6213:11): [True: 4, False: 5.41k]
  ------------------
 6214|      4|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6214:13): [True: 4, False: 0]
  ------------------
 6215|      4|          parser->m_eventPtr = entityTextPtr;
 6216|      4|        result = XML_ERROR_BAD_CHAR_REF;
 6217|      4|        goto endEntityValue;
 6218|      4|      }
 6219|  5.41k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  5.41k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6220|       |      /* The XmlEncode() functions can never return 0 here.  That
 6221|       |       * error return happens if the code point passed in is either
 6222|       |       * negative or greater than or equal to 0x110000.  The
 6223|       |       * XmlCharRefNumber() functions will all return a number
 6224|       |       * strictly less than 0x110000 or a negative value if an error
 6225|       |       * occurred.  The negative value is intercepted above, so
 6226|       |       * XmlEncode() is never passed a value it might return an
 6227|       |       * error for.
 6228|       |       */
 6229|  17.9k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6229:19): [True: 12.5k, False: 5.41k]
  ------------------
 6230|  12.5k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6230:13): [True: 12, False: 12.5k]
  |  Branch (6230:39): [True: 0, False: 12]
  ------------------
 6231|      0|          result = XML_ERROR_NO_MEMORY;
 6232|      0|          goto endEntityValue;
 6233|      0|        }
 6234|  12.5k|        *(pool->ptr)++ = buf[i];
 6235|  12.5k|      }
 6236|  5.41k|    } break;
 6237|  5.41k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     30|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6237:5): [True: 30, False: 777k]
  ------------------
 6238|     30|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6238:11): [True: 30, False: 0]
  ------------------
 6239|     30|        parser->m_eventPtr = entityTextPtr;
 6240|     30|      result = XML_ERROR_INVALID_TOKEN;
 6241|     30|      goto endEntityValue;
 6242|     29|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6242:5): [True: 29, False: 777k]
  ------------------
 6243|     29|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6243:11): [True: 29, False: 0]
  ------------------
 6244|     29|        parser->m_eventPtr = next;
 6245|     29|      result = XML_ERROR_INVALID_TOKEN;
 6246|     29|      goto endEntityValue;
 6247|      0|    default:
  ------------------
  |  Branch (6247:5): [True: 0, False: 777k]
  ------------------
 6248|       |      /* This default case should be unnecessary -- all the tokens
 6249|       |       * that XmlEntityValueTok() can return have their own explicit
 6250|       |       * cases -- but should be retained for safety.  We do however
 6251|       |       * exclude it from the coverage statistics.
 6252|       |       *
 6253|       |       * LCOV_EXCL_START
 6254|       |       */
 6255|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6255:11): [True: 0, False: 0]
  ------------------
 6256|      0|        parser->m_eventPtr = entityTextPtr;
 6257|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6258|      0|      goto endEntityValue;
 6259|       |      /* LCOV_EXCL_STOP */
 6260|   777k|    }
 6261|   771k|    entityTextPtr = next;
 6262|   771k|  }
 6263|  5.89k|endEntityValue:
 6264|  5.89k|#ifdef XML_DTD
 6265|  5.89k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6266|  5.89k|#endif /* XML_DTD */
 6267|  5.89k|  return result;
 6268|  5.89k|}
xmlparse.c:processInternalEntity:
 5717|  87.5k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5718|  87.5k|  const char *textStart, *textEnd;
 5719|  87.5k|  const char *next;
 5720|  87.5k|  enum XML_Error result;
 5721|  87.5k|  OPEN_INTERNAL_ENTITY *openEntity;
 5722|       |
 5723|  87.5k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5723:7): [True: 86.2k, False: 1.34k]
  ------------------
 5724|  86.2k|    openEntity = parser->m_freeInternalEntities;
 5725|  86.2k|    parser->m_freeInternalEntities = openEntity->next;
 5726|  86.2k|  } else {
 5727|  1.34k|    openEntity
 5728|  1.34k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  714|  1.34k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5729|  1.34k|    if (! openEntity)
  ------------------
  |  Branch (5729:9): [True: 0, False: 1.34k]
  ------------------
 5730|      0|      return XML_ERROR_NO_MEMORY;
 5731|  1.34k|  }
 5732|  87.5k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|  87.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5733|  87.5k|#ifdef XML_DTD
 5734|  87.5k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5735|  87.5k|#endif
 5736|  87.5k|  entity->processed = 0;
 5737|  87.5k|  openEntity->next = parser->m_openInternalEntities;
 5738|  87.5k|  parser->m_openInternalEntities = openEntity;
 5739|  87.5k|  openEntity->entity = entity;
 5740|  87.5k|  openEntity->startTagLevel = parser->m_tagLevel;
 5741|  87.5k|  openEntity->betweenDecl = betweenDecl;
 5742|  87.5k|  openEntity->internalEventPtr = NULL;
 5743|  87.5k|  openEntity->internalEventEndPtr = NULL;
 5744|  87.5k|  textStart = (const char *)entity->textPtr;
 5745|  87.5k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5746|       |  /* Set a safe default value in case 'next' does not get set */
 5747|  87.5k|  next = textStart;
 5748|       |
 5749|  87.5k|#ifdef XML_DTD
 5750|  87.5k|  if (entity->is_param) {
  ------------------
  |  Branch (5750:7): [True: 0, False: 87.5k]
  ------------------
 5751|      0|    int tok
 5752|      0|        = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
  ------------------
  |  |  227|      0|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|      0|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5753|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5754|      0|                      tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
                                    tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5755|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5756|      0|  } else
 5757|  87.5k|#endif /* XML_DTD */
 5758|  87.5k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5759|  87.5k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|  87.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5760|  87.5k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5761|       |
 5762|  87.5k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5762:7): [True: 86.9k, False: 576]
  ------------------
 5763|  86.9k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5763:9): [True: 0, False: 86.9k]
  |  Branch (5763:28): [True: 0, False: 0]
  ------------------
 5764|      0|      entity->processed = (int)(next - textStart);
 5765|      0|      parser->m_processor = internalEntityProcessor;
 5766|  86.9k|    } else {
 5767|  86.9k|#ifdef XML_DTD
 5768|  86.9k|      entityTrackingOnClose(parser, entity, __LINE__);
 5769|  86.9k|#endif /* XML_DTD */
 5770|  86.9k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|  86.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5771|  86.9k|      parser->m_openInternalEntities = openEntity->next;
 5772|       |      /* put openEntity back in list of free instances */
 5773|  86.9k|      openEntity->next = parser->m_freeInternalEntities;
 5774|  86.9k|      parser->m_freeInternalEntities = openEntity;
 5775|  86.9k|    }
 5776|  86.9k|  }
 5777|  87.5k|  return result;
 5778|  87.5k|}
xmlparse.c:entityTrackingOnOpen:
 7828|   322k|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7829|   322k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7830|   322k|  assert(! rootParser->m_parentParser);
 7831|       |
 7832|      0|  rootParser->m_entity_stats.countEverOpened++;
 7833|   322k|  rootParser->m_entity_stats.currentDepth++;
 7834|   322k|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7834:7): [True: 1.80k, False: 321k]
  ------------------
 7835|   322k|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7836|  1.80k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7837|  1.80k|  }
 7838|       |
 7839|   322k|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7840|   322k|}
xmlparse.c:entityTrackingReportStats:
 7805|   645k|                          const char *action, int sourceLine) {
 7806|   645k|  assert(! rootParser->m_parentParser);
 7807|   645k|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7807:7): [True: 645k, False: 0]
  ------------------
 7808|   645k|    return;
 7809|       |
 7810|       |#  if defined(XML_UNICODE)
 7811|       |  const char *const entityName = "[..]";
 7812|       |#  else
 7813|      0|  const char *const entityName = entity->name;
 7814|      0|#  endif
 7815|       |
 7816|      0|  fprintf(
 7817|      0|      stderr,
 7818|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7819|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7820|      0|      rootParser->m_entity_stats.currentDepth,
 7821|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7822|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7823|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7823:7): [True: 0, False: 0]
  ------------------
 7824|      0|      sourceLine);
 7825|      0|}
xmlparse.c:entityTrackingOnClose:
 7843|   322k|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7844|   322k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7845|   322k|  assert(! rootParser->m_parentParser);
 7846|       |
 7847|      0|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7848|   322k|  rootParser->m_entity_stats.currentDepth--;
 7849|   322k|}
xmlparse.c:reportProcessingInstruction:
 6293|  23.1k|                            const char *start, const char *end) {
 6294|  23.1k|  const XML_Char *target;
 6295|  23.1k|  XML_Char *data;
 6296|  23.1k|  const char *tem;
 6297|  23.1k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6297:7): [True: 23.1k, False: 0]
  ------------------
 6298|  23.1k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6298:9): [True: 0, False: 23.1k]
  ------------------
 6299|      0|      reportDefault(parser, enc, start, end);
 6300|  23.1k|    return 1;
 6301|  23.1k|  }
 6302|      0|  start += enc->minBytesPerChar * 2;
 6303|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6304|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6305|      0|  if (! target)
  ------------------
  |  Branch (6305:7): [True: 0, False: 0]
  ------------------
 6306|      0|    return 0;
 6307|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6308|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6309|      0|                         end - enc->minBytesPerChar * 2);
 6310|      0|  if (! data)
  ------------------
  |  Branch (6310:7): [True: 0, False: 0]
  ------------------
 6311|      0|    return 0;
 6312|      0|  normalizeLines(data);
 6313|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6314|      0|  poolClear(&parser->m_tempPool);
 6315|      0|  return 1;
 6316|      0|}
xmlparse.c:reportComment:
 6320|  2.43k|              const char *end) {
 6321|  2.43k|  XML_Char *data;
 6322|  2.43k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6322:7): [True: 2.43k, False: 0]
  ------------------
 6323|  2.43k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6323:9): [True: 0, False: 2.43k]
  ------------------
 6324|      0|      reportDefault(parser, enc, start, end);
 6325|  2.43k|    return 1;
 6326|  2.43k|  }
 6327|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6328|      0|                         start + enc->minBytesPerChar * 4,
 6329|      0|                         end - enc->minBytesPerChar * 3);
 6330|      0|  if (! data)
  ------------------
  |  Branch (6330:7): [True: 0, False: 0]
  ------------------
 6331|      0|    return 0;
 6332|      0|  normalizeLines(data);
 6333|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6334|      0|  poolClear(&parser->m_tempPool);
 6335|      0|  return 1;
 6336|      0|}
xmlparse.c:getDebugLevel:
 8391|  33.3k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8392|  33.3k|  const char *const valueOrNull = getenv(variableName);
 8393|  33.3k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8393:7): [True: 33.3k, False: 0]
  ------------------
 8394|  33.3k|    return defaultDebugLevel;
 8395|  33.3k|  }
 8396|      0|  const char *const value = valueOrNull;
 8397|       |
 8398|      0|  errno = 0;
 8399|      0|  char *afterValue = NULL;
 8400|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8401|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8401:7): [True: 0, False: 0]
  |  Branch (8401:23): [True: 0, False: 0]
  |  Branch (8401:48): [True: 0, False: 0]
  ------------------
 8402|      0|    errno = 0;
 8403|      0|    return defaultDebugLevel;
 8404|      0|  }
 8405|       |
 8406|      0|  return debugLevel;
 8407|      0|}
xmlparse.c:destroyBindings:
 1429|  3.63M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1430|  3.63M|  for (;;) {
 1431|  3.63M|    BINDING *b = bindings;
 1432|  3.63M|    if (! b)
  ------------------
  |  Branch (1432:9): [True: 3.63M, False: 0]
  ------------------
 1433|  3.63M|      break;
 1434|      0|    bindings = b->nextTagBinding;
 1435|      0|    FREE(parser, b->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|    FREE(parser, b);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1437|      0|  }
 1438|  3.63M|}
xmlparse.c:startParsing:
  954|  16.6k|startParsing(XML_Parser parser) {
  955|       |  /* hash functions must be initialized before setContext() is called */
  956|  16.6k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (956:7): [True: 0, False: 16.6k]
  ------------------
  957|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  958|  16.6k|  if (parser->m_ns) {
  ------------------
  |  Branch (958:7): [True: 0, False: 16.6k]
  ------------------
  959|       |    /* implicit context only set for root parser, since child
  960|       |       parsers (i.e. external entity parsers) will inherit it
  961|       |    */
  962|      0|    return setContext(parser, implicitContext);
  963|      0|  }
  964|  16.6k|  return XML_TRUE;
  ------------------
  |  |   55|  16.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  965|  16.6k|}
xmlparse.c:dtdDestroy:
 6789|  16.6k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6790|  16.6k|  HASH_TABLE_ITER iter;
 6791|  16.6k|  hashTableIterInit(&iter, &(p->elementTypes));
 6792|  36.2k|  for (;;) {
 6793|  36.2k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6794|  36.2k|    if (! e)
  ------------------
  |  Branch (6794:9): [True: 16.6k, False: 19.6k]
  ------------------
 6795|  16.6k|      break;
 6796|  19.6k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6796:9): [True: 639, False: 18.9k]
  ------------------
 6797|    639|      ms->free_fcn(e->defaultAtts);
 6798|  19.6k|  }
 6799|  16.6k|  hashTableDestroy(&(p->generalEntities));
 6800|  16.6k|#ifdef XML_DTD
 6801|  16.6k|  hashTableDestroy(&(p->paramEntities));
 6802|  16.6k|#endif /* XML_DTD */
 6803|  16.6k|  hashTableDestroy(&(p->elementTypes));
 6804|  16.6k|  hashTableDestroy(&(p->attributeIds));
 6805|  16.6k|  hashTableDestroy(&(p->prefixes));
 6806|  16.6k|  poolDestroy(&(p->pool));
 6807|  16.6k|  poolDestroy(&(p->entityValuePool));
 6808|  16.6k|  if (isDocEntity) {
  ------------------
  |  Branch (6808:7): [True: 16.6k, False: 0]
  ------------------
 6809|  16.6k|    ms->free_fcn(p->scaffIndex);
 6810|  16.6k|    ms->free_fcn(p->scaffold);
 6811|  16.6k|  }
 6812|  16.6k|  ms->free_fcn(p);
 6813|  16.6k|}
xmlparse.c:hashTableDestroy:
 7142|  83.2k|hashTableDestroy(HASH_TABLE *table) {
 7143|  83.2k|  size_t i;
 7144|  1.03M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7144:15): [True: 951k, False: 83.2k]
  ------------------
 7145|   951k|    table->mem->free_fcn(table->v[i]);
 7146|  83.2k|  table->mem->free_fcn(table->v);
 7147|  83.2k|}
xmlparse.c:poolClear:
 7185|  3.68M|poolClear(STRING_POOL *pool) {
 7186|  3.68M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7186:7): [True: 549k, False: 3.13M]
  ------------------
 7187|   549k|    pool->freeBlocks = pool->blocks;
 7188|  3.13M|  else {
 7189|  3.13M|    BLOCK *p = pool->blocks;
 7190|  3.13M|    while (p) {
  ------------------
  |  Branch (7190:12): [True: 2.77k, False: 3.13M]
  ------------------
 7191|  2.77k|      BLOCK *tem = p->next;
 7192|  2.77k|      p->next = pool->freeBlocks;
 7193|  2.77k|      pool->freeBlocks = p;
 7194|  2.77k|      p = tem;
 7195|  2.77k|    }
 7196|  3.13M|  }
 7197|  3.68M|  pool->blocks = NULL;
 7198|  3.68M|  pool->start = NULL;
 7199|  3.68M|  pool->ptr = NULL;
 7200|  3.68M|  pool->end = NULL;
 7201|  3.68M|}
xmlparse.c:poolDestroy:
 7204|  66.6k|poolDestroy(STRING_POOL *pool) {
 7205|  66.6k|  BLOCK *p = pool->blocks;
 7206|  82.6k|  while (p) {
  ------------------
  |  Branch (7206:10): [True: 15.9k, False: 66.6k]
  ------------------
 7207|  15.9k|    BLOCK *tem = p->next;
 7208|  15.9k|    pool->mem->free_fcn(p);
 7209|  15.9k|    p = tem;
 7210|  15.9k|  }
 7211|  66.6k|  p = pool->freeBlocks;
 7212|  68.5k|  while (p) {
  ------------------
  |  Branch (7212:10): [True: 1.96k, False: 66.6k]
  ------------------
 7213|  1.96k|    BLOCK *tem = p->next;
 7214|  1.96k|    pool->mem->free_fcn(p);
 7215|  1.96k|    p = tem;
 7216|  1.96k|  }
 7217|  66.6k|}
xmlparse.c:poolCopyString:
 7237|  11.5k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7238|   154k|  do {
 7239|   154k|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  603|   154k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 6.50k, False: 147k]
  |  |  |  Branch (603:35): [True: 0, False: 6.50k]
  |  |  ------------------
  |  |  604|   154k|       ? 0                                                                     \
  |  |  605|   154k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7239:9): [True: 0, False: 154k]
  ------------------
 7240|      0|      return NULL;
 7241|   154k|  } while (*s++);
  ------------------
  |  Branch (7241:12): [True: 142k, False: 11.5k]
  ------------------
 7242|  11.5k|  s = pool->start;
 7243|  11.5k|  poolFinish(pool);
  ------------------
  |  |  601|  11.5k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7244|  11.5k|  return s;
 7245|  11.5k|}
xmlparse.c:copyString:
 7637|  16.6k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7638|  16.6k|  size_t charsRequired = 0;
 7639|  16.6k|  XML_Char *result;
 7640|       |
 7641|       |  /* First determine how long the string is */
 7642|   149k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7642:10): [True: 133k, False: 16.6k]
  ------------------
 7643|   133k|    charsRequired++;
 7644|   133k|  }
 7645|       |  /* Include the terminator */
 7646|  16.6k|  charsRequired++;
 7647|       |
 7648|       |  /* Now allocate space for the copy */
 7649|  16.6k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7650|  16.6k|  if (result == NULL)
  ------------------
  |  Branch (7650:7): [True: 0, False: 16.6k]
  ------------------
 7651|      0|    return NULL;
 7652|       |  /* Copy the original into place */
 7653|  16.6k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7654|  16.6k|  return result;
 7655|  16.6k|}

XmlPrologStateInit:
 1237|  16.6k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  16.6k|  state->handler = prolog0;
 1239|  16.6k|#ifdef XML_DTD
 1240|  16.6k|  state->documentEntity = 1;
 1241|  16.6k|  state->includeLevel = 0;
 1242|  16.6k|  state->inEntityValue = 0;
 1243|  16.6k|#endif /* XML_DTD */
 1244|  16.6k|}
xmlrole.c:prolog0:
  142|  19.5k|        const ENCODING *enc) {
  143|  19.5k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 239, False: 19.3k]
  ------------------
  144|    623|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    623|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 623, False: 18.9k]
  ------------------
  145|    623|    state->handler = prolog1;
  146|    623|    return XML_ROLE_NONE;
  147|    278|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    278|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 278, False: 19.2k]
  ------------------
  148|    278|    state->handler = prolog1;
  149|    278|    return XML_ROLE_XML_DECL;
  150|    256|  case XML_TOK_PI:
  ------------------
  |  |   76|    256|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 256, False: 19.2k]
  ------------------
  151|    256|    state->handler = prolog1;
  152|    256|    return XML_ROLE_PI;
  153|     54|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     54|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 54, False: 19.4k]
  ------------------
  154|     54|    state->handler = prolog1;
  155|     54|    return XML_ROLE_COMMENT;
  156|  5.78k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  5.78k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 5.78k, False: 13.7k]
  ------------------
  157|  5.78k|    return XML_ROLE_NONE;
  158|  4.63k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  4.63k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 4.63k, False: 14.9k]
  ------------------
  159|  4.63k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  4.63k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 83, False: 4.54k]
  ------------------
  160|  4.63k|                              KW_DOCTYPE))
  161|     83|      break;
  162|  4.54k|    state->handler = doctype0;
  163|  4.54k|    return XML_ROLE_DOCTYPE_NONE;
  164|  7.68k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  7.68k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 7.68k, False: 11.8k]
  ------------------
  165|  7.68k|    state->handler = error;
  166|  7.68k|    return XML_ROLE_INSTANCE_START;
  167|  19.5k|  }
  168|    322|  return common(state, tok);
  169|  19.5k|}
xmlrole.c:prolog1:
  173|  4.95k|        const ENCODING *enc) {
  174|  4.95k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 22, False: 4.93k]
  ------------------
  175|    616|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    616|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 616, False: 4.33k]
  ------------------
  176|    616|    return XML_ROLE_NONE;
  177|  3.13k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.13k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 3.13k, False: 1.82k]
  ------------------
  178|  3.13k|    return XML_ROLE_PI;
  179|    724|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    724|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 724, False: 4.22k]
  ------------------
  180|    724|    return XML_ROLE_COMMENT;
  181|      0|  case XML_TOK_BOM:
  ------------------
  |  |   79|      0|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (181:3): [True: 0, False: 4.95k]
  ------------------
  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|    394|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    394|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 394, False: 4.55k]
  ------------------
  191|    394|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    394|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 4, False: 390]
  ------------------
  192|    394|                              KW_DOCTYPE))
  193|      4|      break;
  194|    390|    state->handler = doctype0;
  195|    390|    return XML_ROLE_DOCTYPE_NONE;
  196|     67|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     67|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 67, False: 4.88k]
  ------------------
  197|     67|    state->handler = error;
  198|     67|    return XML_ROLE_INSTANCE_START;
  199|  4.95k|  }
  200|     26|  return common(state, tok);
  201|  4.95k|}
xmlrole.c:doctype0:
  225|  9.84k|         const ENCODING *enc) {
  226|  9.84k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  9.84k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  9.84k|  UNUSED_P(end);
  ------------------
  |  |  135|  9.84k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  9.84k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.84k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  9.84k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 11, False: 9.83k]
  ------------------
  230|  4.93k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.93k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 4.93k, False: 4.91k]
  ------------------
  231|  4.93k|    return XML_ROLE_DOCTYPE_NONE;
  232|  4.90k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  4.90k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 4.90k, False: 4.94k]
  ------------------
  233|  4.90k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  4.90k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 9.84k]
  ------------------
  234|  4.90k|    state->handler = doctype1;
  235|  4.90k|    return XML_ROLE_DOCTYPE_NAME;
  236|  9.84k|  }
  237|     11|  return common(state, tok);
  238|  9.84k|}
xmlrole.c:doctype1:
  242|  6.05k|         const ENCODING *enc) {
  243|  6.05k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 3, False: 6.04k]
  ------------------
  244|  1.16k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.16k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.16k, False: 4.88k]
  ------------------
  245|  1.16k|    return XML_ROLE_DOCTYPE_NONE;
  246|  4.14k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  4.14k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 4.14k, False: 1.90k]
  ------------------
  247|  4.14k|    state->handler = internalSubset;
  248|  4.14k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     36|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     36|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 36, False: 6.01k]
  ------------------
  250|     36|    state->handler = prolog2;
  251|     36|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    701|  case XML_TOK_NAME:
  ------------------
  |  |   85|    701|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 701, False: 5.35k]
  ------------------
  253|    701|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    701|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 8, False: 693]
  |  |  ------------------
  ------------------
  254|      8|      state->handler = doctype3;
  255|      8|      return XML_ROLE_DOCTYPE_NONE;
  256|      8|    }
  257|    693|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    693|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 671, False: 22]
  |  |  ------------------
  ------------------
  258|    671|      state->handler = doctype2;
  259|    671|      return XML_ROLE_DOCTYPE_NONE;
  260|    671|    }
  261|     22|    break;
  262|  6.05k|  }
  263|     25|  return common(state, tok);
  264|  6.05k|}
xmlrole.c:internalSubset:
  335|  33.4k|               const ENCODING *enc) {
  336|  33.4k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 66, False: 33.4k]
  ------------------
  337|  3.45k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.45k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 3.45k, False: 30.0k]
  ------------------
  338|  3.45k|    return XML_ROLE_NONE;
  339|  24.0k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  24.0k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 24.0k, False: 9.45k]
  ------------------
  340|  24.0k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  24.0k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 8.99k, False: 15.0k]
  |  |  ------------------
  ------------------
  341|  24.0k|                            KW_ENTITY)) {
  342|  8.99k|      state->handler = entity0;
  343|  8.99k|      return XML_ROLE_ENTITY_NONE;
  344|  8.99k|    }
  345|  15.0k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  15.0k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 11.0k, False: 4.02k]
  |  |  ------------------
  ------------------
  346|  15.0k|                            KW_ATTLIST)) {
  347|  11.0k|      state->handler = attlist0;
  348|  11.0k|      return XML_ROLE_ATTLIST_NONE;
  349|  11.0k|    }
  350|  4.02k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  4.02k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 3.32k, False: 704]
  |  |  ------------------
  ------------------
  351|  4.02k|                            KW_ELEMENT)) {
  352|  3.32k|      state->handler = element0;
  353|  3.32k|      return XML_ROLE_ELEMENT_NONE;
  354|  3.32k|    }
  355|    704|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    704|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 677, False: 27]
  |  |  ------------------
  ------------------
  356|    704|                            KW_NOTATION)) {
  357|    677|      state->handler = notation0;
  358|    677|      return XML_ROLE_NOTATION_NONE;
  359|    677|    }
  360|     27|    break;
  361|  2.26k|  case XML_TOK_PI:
  ------------------
  |  |   76|  2.26k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 2.26k, False: 31.2k]
  ------------------
  362|  2.26k|    return XML_ROLE_PI;
  363|    194|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 194, False: 33.3k]
  ------------------
  364|    194|    return XML_ROLE_COMMENT;
  365|  1.61k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  1.61k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 1.61k, False: 31.8k]
  ------------------
  366|  1.61k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  1.86k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  1.86k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 1.86k, False: 31.6k]
  ------------------
  368|  1.86k|    state->handler = doctype5;
  369|  1.86k|    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: 33.4k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  33.4k|  }
  373|     93|  return common(state, tok);
  374|  33.4k|}
xmlrole.c:entity0:
  417|  17.9k|        const ENCODING *enc) {
  418|  17.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  17.9k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  17.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  17.9k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  17.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  17.9k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  17.9k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 5, False: 17.9k]
  ------------------
  422|  8.99k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.99k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 8.99k, False: 8.97k]
  ------------------
  423|  8.99k|    return XML_ROLE_ENTITY_NONE;
  424|  3.05k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  3.05k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 3.05k, False: 14.9k]
  ------------------
  425|  3.05k|    state->handler = entity1;
  426|  3.05k|    return XML_ROLE_ENTITY_NONE;
  427|  5.91k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.91k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 5.91k, False: 12.0k]
  ------------------
  428|  5.91k|    state->handler = entity2;
  429|  5.91k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  17.9k|  }
  431|      5|  return common(state, tok);
  432|  17.9k|}
xmlrole.c:entity1:
  436|  6.08k|        const ENCODING *enc) {
  437|  6.08k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  6.08k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  6.08k|  UNUSED_P(end);
  ------------------
  |  |  135|  6.08k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  6.08k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.08k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  6.08k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 23, False: 6.06k]
  ------------------
  441|  3.04k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.04k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 3.04k, False: 3.03k]
  ------------------
  442|  3.04k|    return XML_ROLE_ENTITY_NONE;
  443|  3.01k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.01k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 3.01k, False: 3.07k]
  ------------------
  444|  3.01k|    state->handler = entity7;
  445|  3.01k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  6.08k|  }
  447|     23|  return common(state, tok);
  448|  6.08k|}
xmlrole.c:entity7:
  544|  6.00k|        const ENCODING *enc) {
  545|  6.00k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 15, False: 5.99k]
  ------------------
  546|  3.01k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.01k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 3.01k, False: 2.99k]
  ------------------
  547|  3.01k|    return XML_ROLE_ENTITY_NONE;
  548|  1.47k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.47k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.47k, False: 4.53k]
  ------------------
  549|  1.47k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.47k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 80, False: 1.39k]
  |  |  ------------------
  ------------------
  550|     80|      state->handler = entity9;
  551|     80|      return XML_ROLE_ENTITY_NONE;
  552|     80|    }
  553|  1.39k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.39k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.39k, False: 4]
  |  |  ------------------
  ------------------
  554|  1.39k|      state->handler = entity8;
  555|  1.39k|      return XML_ROLE_ENTITY_NONE;
  556|  1.39k|    }
  557|      4|    break;
  558|  1.50k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.50k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 1.50k, False: 4.50k]
  ------------------
  559|  1.50k|    state->handler = declClose;
  560|  1.50k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  1.50k|    return XML_ROLE_ENTITY_VALUE;
  562|  6.00k|  }
  563|     19|  return common(state, tok);
  564|  6.00k|}
xmlrole.c:entity9:
  584|  2.91k|        const ENCODING *enc) {
  585|  2.91k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.91k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  2.91k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.91k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  2.91k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.91k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  2.91k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 2, False: 2.91k]
  ------------------
  589|  1.46k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.46k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.46k, False: 1.45k]
  ------------------
  590|  1.46k|    return XML_ROLE_ENTITY_NONE;
  591|  1.45k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.45k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.45k, False: 1.46k]
  ------------------
  592|  1.45k|    state->handler = entity10;
  593|  1.45k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  2.91k|  }
  595|      2|  return common(state, tok);
  596|  2.91k|}
xmlrole.c:entity10:
  600|  1.50k|         const ENCODING *enc) {
  601|  1.50k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.50k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  1.50k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.50k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  1.50k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.50k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  1.50k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 2, False: 1.50k]
  ------------------
  605|     52|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     52|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 52, False: 1.45k]
  ------------------
  606|     52|    return XML_ROLE_ENTITY_NONE;
  607|  1.45k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.45k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.45k, False: 54]
  ------------------
  608|  1.45k|    setTopLevel(state);
  ------------------
  |  |  116|  1.45k|    ((state)->handler                                                          \
  |  |  117|  1.45k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.45k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.45k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  1.50k|  }
  611|      2|  return common(state, tok);
  612|  1.50k|}
xmlrole.c:entity8:
  568|  2.77k|        const ENCODING *enc) {
  569|  2.77k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.77k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  2.77k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.77k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  2.77k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.77k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  2.77k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 2.77k]
  ------------------
  573|  1.39k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.39k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 1.39k, False: 1.38k]
  ------------------
  574|  1.39k|    return XML_ROLE_ENTITY_NONE;
  575|  1.38k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.38k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 1.38k, False: 1.39k]
  ------------------
  576|  1.38k|    state->handler = entity9;
  577|  1.38k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  2.77k|  }
  579|      2|  return common(state, tok);
  580|  2.77k|}
xmlrole.c:declClose:
 1178|  10.6k|          const ENCODING *enc) {
 1179|  10.6k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  10.6k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  10.6k|  UNUSED_P(end);
  ------------------
  |  |  135|  10.6k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  10.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.6k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  10.6k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 68, False: 10.5k]
  ------------------
 1183|  1.08k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.08k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 1.08k, False: 9.55k]
  ------------------
 1184|  1.08k|    return state->role_none;
 1185|  9.48k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  9.48k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 9.48k, False: 1.15k]
  ------------------
 1186|  9.48k|    setTopLevel(state);
  ------------------
  |  |  116|  9.48k|    ((state)->handler                                                          \
  |  |  117|  9.48k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 9.48k, False: 0]
  |  |  ------------------
  ------------------
 1187|  9.48k|    return state->role_none;
 1188|  10.6k|  }
 1189|     68|  return common(state, tok);
 1190|  10.6k|}
xmlrole.c:entity2:
  452|  11.7k|        const ENCODING *enc) {
  453|  11.7k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 9, False: 11.7k]
  ------------------
  454|  5.91k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.91k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 5.91k, False: 5.85k]
  ------------------
  455|  5.91k|    return XML_ROLE_ENTITY_NONE;
  456|  1.10k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.10k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 1.10k, False: 10.6k]
  ------------------
  457|  1.10k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.10k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 357, False: 745]
  |  |  ------------------
  ------------------
  458|    357|      state->handler = entity4;
  459|    357|      return XML_ROLE_ENTITY_NONE;
  460|    357|    }
  461|    745|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    745|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 739, False: 6]
  |  |  ------------------
  ------------------
  462|    739|      state->handler = entity3;
  463|    739|      return XML_ROLE_ENTITY_NONE;
  464|    739|    }
  465|      6|    break;
  466|  4.74k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  4.74k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 4.74k, False: 7.02k]
  ------------------
  467|  4.74k|    state->handler = declClose;
  468|  4.74k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  4.74k|    return XML_ROLE_ENTITY_VALUE;
  470|  11.7k|  }
  471|     15|  return common(state, tok);
  472|  11.7k|}
xmlrole.c:entity4:
  492|  2.14k|        const ENCODING *enc) {
  493|  2.14k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  2.14k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  2.14k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  2.14k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 8, False: 2.13k]
  ------------------
  497|  1.08k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.08k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 1.08k, False: 1.06k]
  ------------------
  498|  1.08k|    return XML_ROLE_ENTITY_NONE;
  499|  1.05k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.05k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 1.05k, False: 1.08k]
  ------------------
  500|  1.05k|    state->handler = entity5;
  501|  1.05k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  2.14k|  }
  503|      8|  return common(state, tok);
  504|  2.14k|}
xmlrole.c:entity5:
  508|  1.26k|        const ENCODING *enc) {
  509|  1.26k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 2, False: 1.26k]
  ------------------
  510|    210|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    210|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 210, False: 1.05k]
  ------------------
  511|    210|    return XML_ROLE_ENTITY_NONE;
  512|    864|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    864|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 864, False: 400]
  ------------------
  513|    864|    setTopLevel(state);
  ------------------
  |  |  116|    864|    ((state)->handler                                                          \
  |  |  117|    864|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 864, False: 0]
  |  |  ------------------
  ------------------
  514|    864|    return XML_ROLE_ENTITY_COMPLETE;
  515|    188|  case XML_TOK_NAME:
  ------------------
  |  |   85|    188|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 188, False: 1.07k]
  ------------------
  516|    188|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    188|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 185, False: 3]
  |  |  ------------------
  ------------------
  517|    185|      state->handler = entity6;
  518|    185|      return XML_ROLE_ENTITY_NONE;
  519|    185|    }
  520|      3|    break;
  521|  1.26k|  }
  522|      5|  return common(state, tok);
  523|  1.26k|}
xmlrole.c:entity6:
  527|    367|        const ENCODING *enc) {
  528|    367|  UNUSED_P(ptr);
  ------------------
  |  |  135|    367|#  define UNUSED_P(p) (void)p
  ------------------
  529|    367|  UNUSED_P(end);
  ------------------
  |  |  135|    367|#  define UNUSED_P(p) (void)p
  ------------------
  530|    367|  UNUSED_P(enc);
  ------------------
  |  |  135|    367|#  define UNUSED_P(p) (void)p
  ------------------
  531|    367|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 1, False: 366]
  ------------------
  532|    184|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    184|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 184, False: 183]
  ------------------
  533|    184|    return XML_ROLE_ENTITY_NONE;
  534|    182|  case XML_TOK_NAME:
  ------------------
  |  |   85|    182|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 182, False: 185]
  ------------------
  535|    182|    state->handler = declClose;
  536|    182|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    182|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|    367|  }
  539|      1|  return common(state, tok);
  540|    367|}
xmlrole.c:entity3:
  476|  1.47k|        const ENCODING *enc) {
  477|  1.47k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.47k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  1.47k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.47k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  1.47k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.47k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  1.47k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 2, False: 1.47k]
  ------------------
  481|    739|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    739|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 739, False: 735]
  ------------------
  482|    739|    return XML_ROLE_ENTITY_NONE;
  483|    733|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    733|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 733, False: 741]
  ------------------
  484|    733|    state->handler = entity4;
  485|    733|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  1.47k|  }
  487|      2|  return common(state, tok);
  488|  1.47k|}
xmlrole.c:attlist0:
  705|  22.0k|         const ENCODING *enc) {
  706|  22.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  22.0k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  22.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  22.0k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  22.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  22.0k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  22.0k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 8, False: 22.0k]
  ------------------
  710|  11.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  11.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 11.0k, False: 11.0k]
  ------------------
  711|  11.0k|    return XML_ROLE_ATTLIST_NONE;
  712|  10.9k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.9k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 10.9k, False: 11.0k]
  ------------------
  713|  10.9k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  10.9k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 22.0k]
  ------------------
  714|  10.9k|    state->handler = attlist1;
  715|  10.9k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  22.0k|  }
  717|      8|  return common(state, tok);
  718|  22.0k|}
xmlrole.c:attlist1:
  722|   138k|         const ENCODING *enc) {
  723|   138k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   138k|#  define UNUSED_P(p) (void)p
  ------------------
  724|   138k|  UNUSED_P(end);
  ------------------
  |  |  135|   138k|#  define UNUSED_P(p) (void)p
  ------------------
  725|   138k|  UNUSED_P(enc);
  ------------------
  |  |  135|   138k|#  define UNUSED_P(p) (void)p
  ------------------
  726|   138k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 19, False: 138k]
  ------------------
  727|  63.9k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  63.9k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 63.9k, False: 74.1k]
  ------------------
  728|  63.9k|    return XML_ROLE_ATTLIST_NONE;
  729|  10.3k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  10.3k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 10.3k, False: 127k]
  ------------------
  730|  10.3k|    setTopLevel(state);
  ------------------
  |  |  116|  10.3k|    ((state)->handler                                                          \
  |  |  117|  10.3k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 10.3k, False: 0]
  |  |  ------------------
  ------------------
  731|  10.3k|    return XML_ROLE_ATTLIST_NONE;
  732|  63.7k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  63.7k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 63.7k, False: 74.2k]
  ------------------
  733|  63.7k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  63.7k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 138k]
  ------------------
  734|  63.7k|    state->handler = attlist2;
  735|  63.7k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|   138k|  }
  737|     19|  return common(state, tok);
  738|   138k|}
xmlrole.c:attlist2:
  742|   127k|         const ENCODING *enc) {
  743|   127k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 15, False: 127k]
  ------------------
  744|  63.7k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  63.7k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 63.7k, False: 63.6k]
  ------------------
  745|  63.7k|    return XML_ROLE_ATTLIST_NONE;
  746|  9.99k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  9.99k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 9.99k, False: 117k]
  ------------------
  747|  9.99k|    static const char *const types[] = {
  748|  9.99k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  9.99k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  9.99k|    };
  751|  9.99k|    int i;
  752|  35.4k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 34.9k, False: 433]
  ------------------
  753|  34.9k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  34.9k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 9.56k, False: 25.4k]
  |  |  ------------------
  ------------------
  754|  9.56k|        state->handler = attlist8;
  755|  9.56k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  9.56k|      }
  757|  9.99k|  }
  758|    433|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    433|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 392, False: 41]
  |  |  ------------------
  ------------------
  759|    392|      state->handler = attlist5;
  760|    392|      return XML_ROLE_ATTLIST_NONE;
  761|    392|    }
  762|     41|    break;
  763|  53.6k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  53.6k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 53.6k, False: 73.7k]
  ------------------
  764|  53.6k|    state->handler = attlist3;
  765|  53.6k|    return XML_ROLE_ATTLIST_NONE;
  766|   127k|  }
  767|     56|  return common(state, tok);
  768|   127k|}
xmlrole.c:attlist8:
  861|   126k|         const ENCODING *enc) {
  862|   126k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 17, False: 126k]
  ------------------
  863|  63.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  63.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 63.4k, False: 63.3k]
  ------------------
  864|  63.4k|    return XML_ROLE_ATTLIST_NONE;
  865|  56.2k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  56.2k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 56.2k, False: 70.5k]
  ------------------
  866|  56.2k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  56.2k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 52.5k, False: 3.64k]
  |  |  ------------------
  ------------------
  867|  56.2k|                            KW_IMPLIED)) {
  868|  52.5k|      state->handler = attlist1;
  869|  52.5k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  52.5k|    }
  871|  3.64k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  3.64k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.53k, False: 1.11k]
  |  |  ------------------
  ------------------
  872|  3.64k|                            KW_REQUIRED)) {
  873|  2.53k|      state->handler = attlist1;
  874|  2.53k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  2.53k|    }
  876|  1.11k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.11k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.10k, False: 14]
  |  |  ------------------
  ------------------
  877|  1.11k|                            KW_FIXED)) {
  878|  1.10k|      state->handler = attlist9;
  879|  1.10k|      return XML_ROLE_ATTLIST_NONE;
  880|  1.10k|    }
  881|     14|    break;
  882|  7.12k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  7.12k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 7.12k, False: 119k]
  ------------------
  883|  7.12k|    state->handler = attlist1;
  884|  7.12k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|   126k|  }
  886|     31|  return common(state, tok);
  887|   126k|}
xmlrole.c:attlist9:
  891|  2.18k|         const ENCODING *enc) {
  892|  2.18k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.18k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  2.18k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.18k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  2.18k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.18k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  2.18k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 11, False: 2.16k]
  ------------------
  896|  1.10k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.10k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 1.10k, False: 1.08k]
  ------------------
  897|  1.10k|    return XML_ROLE_ATTLIST_NONE;
  898|  1.06k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.06k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 1.06k, False: 1.11k]
  ------------------
  899|  1.06k|    state->handler = attlist1;
  900|  1.06k|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  2.18k|  }
  902|     11|  return common(state, tok);
  903|  2.18k|}
xmlrole.c:attlist5:
  809|    782|         const ENCODING *enc) {
  810|    782|  UNUSED_P(ptr);
  ------------------
  |  |  135|    782|#  define UNUSED_P(p) (void)p
  ------------------
  811|    782|  UNUSED_P(end);
  ------------------
  |  |  135|    782|#  define UNUSED_P(p) (void)p
  ------------------
  812|    782|  UNUSED_P(enc);
  ------------------
  |  |  135|    782|#  define UNUSED_P(p) (void)p
  ------------------
  813|    782|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 1, False: 781]
  ------------------
  814|    392|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    392|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 392, False: 390]
  ------------------
  815|    392|    return XML_ROLE_ATTLIST_NONE;
  816|    389|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    389|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 389, False: 393]
  ------------------
  817|    389|    state->handler = attlist6;
  818|    389|    return XML_ROLE_ATTLIST_NONE;
  819|    782|  }
  820|      1|  return common(state, tok);
  821|    782|}
xmlrole.c:attlist6:
  825|  1.74k|         const ENCODING *enc) {
  826|  1.74k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.74k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.74k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.74k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 3, False: 1.73k]
  ------------------
  830|    416|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    416|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 416, False: 1.32k]
  ------------------
  831|    416|    return XML_ROLE_ATTLIST_NONE;
  832|  1.32k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.32k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 1.32k, False: 419]
  ------------------
  833|  1.32k|    state->handler = attlist7;
  834|  1.32k|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.74k|  }
  836|      3|  return common(state, tok);
  837|  1.74k|}
xmlrole.c:attlist7:
  841|  1.65k|         const ENCODING *enc) {
  842|  1.65k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.65k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.65k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.65k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.65k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.65k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.65k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 1, False: 1.65k]
  ------------------
  846|    343|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    343|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 343, False: 1.31k]
  ------------------
  847|    343|    return XML_ROLE_ATTLIST_NONE;
  848|    360|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    360|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 360, False: 1.29k]
  ------------------
  849|    360|    state->handler = attlist8;
  850|    360|    return XML_ROLE_ATTLIST_NONE;
  851|    954|  case XML_TOK_OR:
  ------------------
  |  |   88|    954|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 954, False: 704]
  ------------------
  852|    954|    state->handler = attlist6;
  853|    954|    return XML_ROLE_ATTLIST_NONE;
  854|  1.65k|  }
  855|      1|  return common(state, tok);
  856|  1.65k|}
xmlrole.c:attlist3:
  772|  72.8k|         const ENCODING *enc) {
  773|  72.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  72.8k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  72.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  72.8k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  72.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  72.8k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  72.8k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 7, False: 72.8k]
  ------------------
  777|  1.19k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.19k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 1.19k, False: 71.6k]
  ------------------
  778|  1.19k|    return XML_ROLE_ATTLIST_NONE;
  779|  17.3k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  17.3k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 17.3k, False: 55.5k]
  ------------------
  780|  71.6k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  71.6k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 54.3k, False: 18.5k]
  ------------------
  781|  71.6k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  71.6k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 72.8k]
  ------------------
  782|  71.6k|    state->handler = attlist4;
  783|  71.6k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  72.8k|  }
  785|      7|  return common(state, tok);
  786|  72.8k|}
xmlrole.c:attlist4:
  790|  72.0k|         const ENCODING *enc) {
  791|  72.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  72.0k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  72.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  72.0k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  72.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  72.0k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  72.0k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 10, False: 72.0k]
  ------------------
  795|    401|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    401|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 401, False: 71.6k]
  ------------------
  796|    401|    return XML_ROLE_ATTLIST_NONE;
  797|  53.5k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  53.5k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 53.5k, False: 18.5k]
  ------------------
  798|  53.5k|    state->handler = attlist8;
  799|  53.5k|    return XML_ROLE_ATTLIST_NONE;
  800|  18.0k|  case XML_TOK_OR:
  ------------------
  |  |   88|  18.0k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 18.0k, False: 53.9k]
  ------------------
  801|  18.0k|    state->handler = attlist3;
  802|  18.0k|    return XML_ROLE_ATTLIST_NONE;
  803|  72.0k|  }
  804|     10|  return common(state, tok);
  805|  72.0k|}
xmlrole.c:element0:
  907|  6.63k|         const ENCODING *enc) {
  908|  6.63k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  6.63k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  6.63k|  UNUSED_P(end);
  ------------------
  |  |  135|  6.63k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  6.63k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.63k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  6.63k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 5, False: 6.63k]
  ------------------
  912|  3.32k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.32k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 3.32k, False: 3.31k]
  ------------------
  913|  3.32k|    return XML_ROLE_ELEMENT_NONE;
  914|  3.31k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.31k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 3.31k, False: 3.32k]
  ------------------
  915|  3.31k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  3.31k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 6.63k]
  ------------------
  916|  3.31k|    state->handler = element1;
  917|  3.31k|    return XML_ROLE_ELEMENT_NAME;
  918|  6.63k|  }
  919|      5|  return common(state, tok);
  920|  6.63k|}
xmlrole.c:element1:
  924|  6.61k|         const ENCODING *enc) {
  925|  6.61k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 6, False: 6.61k]
  ------------------
  926|  3.30k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.30k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 3.30k, False: 3.30k]
  ------------------
  927|  3.30k|    return XML_ROLE_ELEMENT_NONE;
  928|     24|  case XML_TOK_NAME:
  ------------------
  |  |   85|     24|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 24, False: 6.59k]
  ------------------
  929|     24|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|     24|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10, False: 14]
  |  |  ------------------
  ------------------
  930|     10|      state->handler = declClose;
  931|     10|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|     10|      return XML_ROLE_CONTENT_EMPTY;
  933|     10|    }
  934|     14|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|     14|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10, False: 4]
  |  |  ------------------
  ------------------
  935|     10|      state->handler = declClose;
  936|     10|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|     10|      return XML_ROLE_CONTENT_ANY;
  938|     10|    }
  939|      4|    break;
  940|  3.27k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  3.27k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 3.27k, False: 3.33k]
  ------------------
  941|  3.27k|    state->handler = element2;
  942|  3.27k|    state->level = 1;
  943|  3.27k|    return XML_ROLE_GROUP_OPEN;
  944|  6.61k|  }
  945|     10|  return common(state, tok);
  946|  6.61k|}
xmlrole.c:element2:
  950|  3.33k|         const ENCODING *enc) {
  951|  3.33k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 6, False: 3.33k]
  ------------------
  952|     73|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     73|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 73, False: 3.26k]
  ------------------
  953|     73|    return XML_ROLE_ELEMENT_NONE;
  954|    395|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|    395|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 395, False: 2.94k]
  ------------------
  955|    395|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    395|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 388, False: 7]
  |  |  ------------------
  ------------------
  956|    395|                            KW_PCDATA)) {
  957|    388|      state->handler = element3;
  958|    388|      return XML_ROLE_CONTENT_PCDATA;
  959|    388|    }
  960|      7|    break;
  961|    809|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    809|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 809, False: 2.52k]
  ------------------
  962|    809|    state->level = 2;
  963|    809|    state->handler = element6;
  964|    809|    return XML_ROLE_GROUP_OPEN;
  965|    491|  case XML_TOK_NAME:
  ------------------
  |  |   85|    491|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 491, False: 2.84k]
  ------------------
  966|    491|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|    491|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 3.33k]
  ------------------
  967|    491|    state->handler = element7;
  968|    491|    return XML_ROLE_CONTENT_ELEMENT;
  969|     34|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|     34|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 34, False: 3.30k]
  ------------------
  970|     34|    state->handler = element7;
  971|     34|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    884|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    884|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 884, False: 2.45k]
  ------------------
  973|    884|    state->handler = element7;
  974|    884|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    646|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    646|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 646, False: 2.69k]
  ------------------
  976|    646|    state->handler = element7;
  977|    646|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  3.33k|  }
  979|     13|  return common(state, tok);
  980|  3.33k|}
xmlrole.c:element3:
  984|    596|         const ENCODING *enc) {
  985|    596|  UNUSED_P(ptr);
  ------------------
  |  |  135|    596|#  define UNUSED_P(p) (void)p
  ------------------
  986|    596|  UNUSED_P(end);
  ------------------
  |  |  135|    596|#  define UNUSED_P(p) (void)p
  ------------------
  987|    596|  UNUSED_P(enc);
  ------------------
  |  |  135|    596|#  define UNUSED_P(p) (void)p
  ------------------
  988|    596|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 4, False: 592]
  ------------------
  989|    213|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    213|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 213, False: 383]
  ------------------
  990|    213|    return XML_ROLE_ELEMENT_NONE;
  991|    212|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    212|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 212, False: 384]
  ------------------
  992|    212|    state->handler = declClose;
  993|    212|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|    212|    return XML_ROLE_GROUP_CLOSE;
  995|     99|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|     99|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 99, False: 497]
  ------------------
  996|     99|    state->handler = declClose;
  997|     99|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|     99|    return XML_ROLE_GROUP_CLOSE_REP;
  999|     68|  case XML_TOK_OR:
  ------------------
  |  |   88|     68|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 68, False: 528]
  ------------------
 1000|     68|    state->handler = element4;
 1001|     68|    return XML_ROLE_ELEMENT_NONE;
 1002|    596|  }
 1003|      4|  return common(state, tok);
 1004|    596|}
xmlrole.c:element4:
 1008|    881|         const ENCODING *enc) {
 1009|    881|  UNUSED_P(ptr);
  ------------------
  |  |  135|    881|#  define UNUSED_P(p) (void)p
  ------------------
 1010|    881|  UNUSED_P(end);
  ------------------
  |  |  135|    881|#  define UNUSED_P(p) (void)p
  ------------------
 1011|    881|  UNUSED_P(enc);
  ------------------
  |  |  135|    881|#  define UNUSED_P(p) (void)p
  ------------------
 1012|    881|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 6, False: 875]
  ------------------
 1013|    208|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    208|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 208, False: 673]
  ------------------
 1014|    208|    return XML_ROLE_ELEMENT_NONE;
 1015|    667|  case XML_TOK_NAME:
  ------------------
  |  |   85|    667|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 667, False: 214]
  ------------------
 1016|    667|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|    667|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 881]
  ------------------
 1017|    667|    state->handler = element5;
 1018|    667|    return XML_ROLE_CONTENT_ELEMENT;
 1019|    881|  }
 1020|      6|  return common(state, tok);
 1021|    881|}
xmlrole.c:element5:
 1025|    994|         const ENCODING *enc) {
 1026|    994|  UNUSED_P(ptr);
  ------------------
  |  |  135|    994|#  define UNUSED_P(p) (void)p
  ------------------
 1027|    994|  UNUSED_P(end);
  ------------------
  |  |  135|    994|#  define UNUSED_P(p) (void)p
  ------------------
 1028|    994|  UNUSED_P(enc);
  ------------------
  |  |  135|    994|#  define UNUSED_P(p) (void)p
  ------------------
 1029|    994|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 1, False: 993]
  ------------------
 1030|    334|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    334|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 334, False: 660]
  ------------------
 1031|    334|    return XML_ROLE_ELEMENT_NONE;
 1032|     34|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|     34|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 34, False: 960]
  ------------------
 1033|     34|    state->handler = declClose;
 1034|     34|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|     34|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|    625|  case XML_TOK_OR:
  ------------------
  |  |   88|    625|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 625, False: 369]
  ------------------
 1037|    625|    state->handler = element4;
 1038|    625|    return XML_ROLE_ELEMENT_NONE;
 1039|    994|  }
 1040|      1|  return common(state, tok);
 1041|    994|}
xmlrole.c:element6:
 1045|  3.02M|         const ENCODING *enc) {
 1046|  3.02M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.02M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  3.02M|  UNUSED_P(end);
  ------------------
  |  |  135|  3.02M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  3.02M|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.02M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  3.02M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 34, False: 3.02M]
  ------------------
 1050|  32.3k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  32.3k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 32.3k, False: 2.99M]
  ------------------
 1051|  32.3k|    return XML_ROLE_ELEMENT_NONE;
 1052|  2.97M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  2.97M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 2.97M, False: 55.7k]
  ------------------
 1053|  2.97M|    state->level += 1;
 1054|  2.97M|    return XML_ROLE_GROUP_OPEN;
 1055|  19.4k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  19.4k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 19.4k, False: 3.00M]
  ------------------
 1056|  19.4k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  19.4k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 3.02M]
  ------------------
 1057|  19.4k|    state->handler = element7;
 1058|  19.4k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|    179|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    179|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 179, False: 3.02M]
  ------------------
 1060|    179|    state->handler = element7;
 1061|    179|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|  2.71k|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|  2.71k|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 2.71k, False: 3.02M]
  ------------------
 1063|  2.71k|    state->handler = element7;
 1064|  2.71k|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|  1.01k|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|  1.01k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 1.01k, False: 3.02M]
  ------------------
 1066|  1.01k|    state->handler = element7;
 1067|  1.01k|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  3.02M|  }
 1069|     34|  return common(state, tok);
 1070|  3.02M|}
xmlrole.c:element7:
 1074|  82.2k|         const ENCODING *enc) {
 1075|  82.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  82.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|  82.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  82.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|  82.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  82.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|  82.2k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 48, False: 82.2k]
  ------------------
 1079|  3.97k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.97k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 3.97k, False: 78.3k]
  ------------------
 1080|  3.97k|    return XML_ROLE_ELEMENT_NONE;
 1081|  10.6k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  10.6k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 10.6k, False: 71.6k]
  ------------------
 1082|  10.6k|    state->level -= 1;
 1083|  10.6k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 1.66k, False: 9.02k]
  ------------------
 1084|  1.66k|      state->handler = declClose;
 1085|  1.66k|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|  1.66k|    }
 1087|  10.6k|    return XML_ROLE_GROUP_CLOSE;
 1088|  1.57k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  1.57k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 1.57k, False: 80.7k]
  ------------------
 1089|  1.57k|    state->level -= 1;
 1090|  1.57k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 372, False: 1.20k]
  ------------------
 1091|    372|      state->handler = declClose;
 1092|    372|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    372|    }
 1094|  1.57k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  14.2k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  14.2k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 14.2k, False: 68.0k]
  ------------------
 1096|  14.2k|    state->level -= 1;
 1097|  14.2k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 259, False: 13.9k]
  ------------------
 1098|    259|      state->handler = declClose;
 1099|    259|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    259|    }
 1101|  14.2k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  29.0k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  29.0k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 29.0k, False: 53.2k]
  ------------------
 1103|  29.0k|    state->level -= 1;
 1104|  29.0k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 252, False: 28.8k]
  ------------------
 1105|    252|      state->handler = declClose;
 1106|    252|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|    252|    }
 1108|  29.0k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  16.5k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  16.5k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 16.5k, False: 65.7k]
  ------------------
 1110|  16.5k|    state->handler = element6;
 1111|  16.5k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  6.13k|  case XML_TOK_OR:
  ------------------
  |  |   88|  6.13k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 6.13k, False: 76.1k]
  ------------------
 1113|  6.13k|    state->handler = element6;
 1114|  6.13k|    return XML_ROLE_GROUP_CHOICE;
 1115|  82.2k|  }
 1116|     48|  return common(state, tok);
 1117|  82.2k|}
xmlrole.c:notation0:
  616|  1.34k|          const ENCODING *enc) {
  617|  1.34k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.34k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  1.34k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.34k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  1.34k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.34k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  1.34k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 1, False: 1.34k]
  ------------------
  621|    676|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    676|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 676, False: 669]
  ------------------
  622|    676|    return XML_ROLE_NOTATION_NONE;
  623|    668|  case XML_TOK_NAME:
  ------------------
  |  |   85|    668|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 668, False: 677]
  ------------------
  624|    668|    state->handler = notation1;
  625|    668|    return XML_ROLE_NOTATION_NAME;
  626|  1.34k|  }
  627|      1|  return common(state, tok);
  628|  1.34k|}
xmlrole.c:notation1:
  632|  1.32k|          const ENCODING *enc) {
  633|  1.32k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 3, False: 1.32k]
  ------------------
  634|    667|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    667|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 667, False: 662]
  ------------------
  635|    667|    return XML_ROLE_NOTATION_NONE;
  636|    659|  case XML_TOK_NAME:
  ------------------
  |  |   85|    659|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 659, False: 670]
  ------------------
  637|    659|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    659|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 277, False: 382]
  |  |  ------------------
  ------------------
  638|    277|      state->handler = notation3;
  639|    277|      return XML_ROLE_NOTATION_NONE;
  640|    277|    }
  641|    382|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    382|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 377, False: 5]
  |  |  ------------------
  ------------------
  642|    377|      state->handler = notation2;
  643|    377|      return XML_ROLE_NOTATION_NONE;
  644|    377|    }
  645|      5|    break;
  646|  1.32k|  }
  647|      8|  return common(state, tok);
  648|  1.32k|}
xmlrole.c:notation3:
  668|    552|          const ENCODING *enc) {
  669|    552|  UNUSED_P(ptr);
  ------------------
  |  |  135|    552|#  define UNUSED_P(p) (void)p
  ------------------
  670|    552|  UNUSED_P(end);
  ------------------
  |  |  135|    552|#  define UNUSED_P(p) (void)p
  ------------------
  671|    552|  UNUSED_P(enc);
  ------------------
  |  |  135|    552|#  define UNUSED_P(p) (void)p
  ------------------
  672|    552|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 3, False: 549]
  ------------------
  673|    276|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    276|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 276, False: 276]
  ------------------
  674|    276|    return XML_ROLE_NOTATION_NONE;
  675|    273|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    273|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 273, False: 279]
  ------------------
  676|    273|    state->handler = declClose;
  677|    273|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    273|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    552|  }
  680|      3|  return common(state, tok);
  681|    552|}
xmlrole.c:notation2:
  652|    752|          const ENCODING *enc) {
  653|    752|  UNUSED_P(ptr);
  ------------------
  |  |  135|    752|#  define UNUSED_P(p) (void)p
  ------------------
  654|    752|  UNUSED_P(end);
  ------------------
  |  |  135|    752|#  define UNUSED_P(p) (void)p
  ------------------
  655|    752|  UNUSED_P(enc);
  ------------------
  |  |  135|    752|#  define UNUSED_P(p) (void)p
  ------------------
  656|    752|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 1, False: 751]
  ------------------
  657|    377|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    377|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 377, False: 375]
  ------------------
  658|    377|    return XML_ROLE_NOTATION_NONE;
  659|    374|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    374|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 374, False: 378]
  ------------------
  660|    374|    state->handler = notation4;
  661|    374|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|    752|  }
  663|      1|  return common(state, tok);
  664|    752|}
xmlrole.c:notation4:
  685|    590|          const ENCODING *enc) {
  686|    590|  UNUSED_P(ptr);
  ------------------
  |  |  135|    590|#  define UNUSED_P(p) (void)p
  ------------------
  687|    590|  UNUSED_P(end);
  ------------------
  |  |  135|    590|#  define UNUSED_P(p) (void)p
  ------------------
  688|    590|  UNUSED_P(enc);
  ------------------
  |  |  135|    590|#  define UNUSED_P(p) (void)p
  ------------------
  689|    590|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 1, False: 589]
  ------------------
  690|    220|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    220|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 220, False: 370]
  ------------------
  691|    220|    return XML_ROLE_NOTATION_NONE;
  692|    104|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    104|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 104, False: 486]
  ------------------
  693|    104|    state->handler = declClose;
  694|    104|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    104|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|    265|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    265|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 265, False: 325]
  ------------------
  697|    265|    setTopLevel(state);
  ------------------
  |  |  116|    265|    ((state)->handler                                                          \
  |  |  117|    265|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 265, False: 0]
  |  |  ------------------
  ------------------
  698|    265|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|    590|  }
  700|      1|  return common(state, tok);
  701|    590|}
xmlrole.c:doctype5:
  319|  1.87k|         const ENCODING *enc) {
  320|  1.87k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.87k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  1.87k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.87k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  1.87k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.87k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  1.87k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 10, False: 1.86k]
  ------------------
  324|     27|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     27|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 27, False: 1.85k]
  ------------------
  325|     27|    return XML_ROLE_DOCTYPE_NONE;
  326|  1.84k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.84k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 1.84k, False: 37]
  ------------------
  327|  1.84k|    state->handler = prolog2;
  328|  1.84k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  1.87k|  }
  330|     10|  return common(state, tok);
  331|  1.87k|}
xmlrole.c:prolog2:
  205|  3.08k|        const ENCODING *enc) {
  206|  3.08k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.08k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.08k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.08k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.08k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.08k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.08k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 10, False: 3.07k]
  ------------------
  210|    415|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    415|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 415, False: 2.66k]
  ------------------
  211|    415|    return XML_ROLE_NONE;
  212|    435|  case XML_TOK_PI:
  ------------------
  |  |   76|    435|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 435, False: 2.64k]
  ------------------
  213|    435|    return XML_ROLE_PI;
  214|    380|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    380|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 380, False: 2.70k]
  ------------------
  215|    380|    return XML_ROLE_COMMENT;
  216|  1.84k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  1.84k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 1.84k, False: 1.24k]
  ------------------
  217|  1.84k|    state->handler = error;
  218|  1.84k|    return XML_ROLE_INSTANCE_START;
  219|  3.08k|  }
  220|     10|  return common(state, tok);
  221|  3.08k|}
xmlrole.c:doctype3:
  284|    501|         const ENCODING *enc) {
  285|    501|  UNUSED_P(ptr);
  ------------------
  |  |  135|    501|#  define UNUSED_P(p) (void)p
  ------------------
  286|    501|  UNUSED_P(end);
  ------------------
  |  |  135|    501|#  define UNUSED_P(p) (void)p
  ------------------
  287|    501|  UNUSED_P(enc);
  ------------------
  |  |  135|    501|#  define UNUSED_P(p) (void)p
  ------------------
  288|    501|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 94, False: 407]
  ------------------
  289|    366|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    366|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 366, False: 135]
  ------------------
  290|    366|    return XML_ROLE_DOCTYPE_NONE;
  291|     41|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     41|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 41, False: 460]
  ------------------
  292|     41|    state->handler = doctype4;
  293|     41|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    501|  }
  295|     94|  return common(state, tok);
  296|    501|}
xmlrole.c:doctype4:
  300|     48|         const ENCODING *enc) {
  301|     48|  UNUSED_P(ptr);
  ------------------
  |  |  135|     48|#  define UNUSED_P(p) (void)p
  ------------------
  302|     48|  UNUSED_P(end);
  ------------------
  |  |  135|     48|#  define UNUSED_P(p) (void)p
  ------------------
  303|     48|  UNUSED_P(enc);
  ------------------
  |  |  135|     48|#  define UNUSED_P(p) (void)p
  ------------------
  304|     48|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 8, False: 40]
  ------------------
  305|     18|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     18|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 18, False: 30]
  ------------------
  306|     18|    return XML_ROLE_DOCTYPE_NONE;
  307|     10|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|     10|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 10, False: 38]
  ------------------
  308|     10|    state->handler = internalSubset;
  309|     10|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  310|     12|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     12|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (310:3): [True: 12, False: 36]
  ------------------
  311|     12|    state->handler = prolog2;
  312|     12|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     48|  }
  314|      8|  return common(state, tok);
  315|     48|}
xmlrole.c:doctype2:
  268|  1.33k|         const ENCODING *enc) {
  269|  1.33k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.33k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.33k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.33k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.33k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.33k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.33k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 9, False: 1.32k]
  ------------------
  273|    671|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    671|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 671, False: 666]
  ------------------
  274|    671|    return XML_ROLE_DOCTYPE_NONE;
  275|    657|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    657|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 657, False: 680]
  ------------------
  276|    657|    state->handler = doctype3;
  277|    657|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.33k|  }
  279|      9|  return common(state, tok);
  280|  1.33k|}
xmlrole.c:common:
 1225|  1.04k|common(PROLOG_STATE *state, int tok) {
 1226|  1.04k|#ifdef XML_DTD
 1227|  1.04k|  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.04k]
  |  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.04k|  state->handler = error;
 1233|  1.04k|  return XML_ROLE_ERROR;
 1234|  1.04k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  6.25M|                                           const char **fromLimRef) {
  328|  6.25M|  const char *fromLim = *fromLimRef;
  329|  6.25M|  size_t walked = 0;
  330|  10.1M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 10.1M, False: 2.52k]
  ------------------
  331|  10.1M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  10.1M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 96.7k, False: 10.0M]
  ------------------
  333|  10.1M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|  96.7k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 96.4k, False: 303]
  ------------------
  335|  96.4k|        fromLim += 4 - 1;
  336|  96.4k|        break;
  337|  96.4k|      } else {
  338|    303|        walked = 0;
  339|    303|      }
  340|  10.0M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 1.76M, False: 8.26M]
  ------------------
  341|  10.0M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|  1.76M|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 1.76M, False: 1.42k]
  ------------------
  343|  1.76M|        fromLim += 3 - 1;
  344|  1.76M|        break;
  345|  1.76M|      } else {
  346|  1.42k|        walked = 0;
  347|  1.42k|      }
  348|  8.26M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 52.1k, False: 8.21M]
  ------------------
  349|  8.26M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|  52.1k|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 51.8k, False: 265]
  ------------------
  351|  51.8k|        fromLim += 2 - 1;
  352|  51.8k|        break;
  353|  51.8k|      } else {
  354|    265|        walked = 0;
  355|    265|      }
  356|  8.21M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 4.33M, False: 3.87M]
  ------------------
  357|  8.21M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  4.33M|      break;
  359|  4.33M|    }
  360|  10.1M|  }
  361|  6.25M|  *fromLimRef = fromLim;
  362|  6.25M|}
XmlUtf8Encode:
 1255|  9.63k|XmlUtf8Encode(int c, char *buf) {
 1256|  9.63k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  9.63k|    min2 = 0x80,
 1259|  9.63k|    min3 = 0x800,
 1260|  9.63k|    min4 = 0x10000
 1261|  9.63k|  };
 1262|       |
 1263|  9.63k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 9.63k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  9.63k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 2.53k, False: 7.10k]
  ------------------
 1266|  2.53k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  2.53k|    return 1;
 1268|  2.53k|  }
 1269|  7.10k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 2.65k, False: 4.44k]
  ------------------
 1270|  2.65k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  2.65k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  2.65k|    return 2;
 1273|  2.65k|  }
 1274|  4.44k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 2.78k, False: 1.66k]
  ------------------
 1275|  2.78k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  2.78k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  2.78k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  2.78k|    return 3;
 1279|  2.78k|  }
 1280|  1.66k|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 1.66k, False: 0]
  ------------------
 1281|  1.66k|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|  1.66k|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|  1.66k|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|  1.66k|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|  1.66k|    return 4;
 1286|  1.66k|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|  1.66k|}
xmltok.c:checkCharRefNumber:
 1231|  18.5k|checkCharRefNumber(int result) {
 1232|  18.5k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 11.3k, False: 7.16k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 18.5k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 18.5k]
  ------------------
 1235|      9|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 18.5k]
  ------------------
 1236|     12|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 18.5k]
  ------------------
 1237|     16|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 4, False: 18.5k]
  ------------------
 1238|     24|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 8, False: 18.5k]
  ------------------
 1239|     27|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 18.5k]
  ------------------
 1240|     32|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 5, False: 18.5k]
  ------------------
 1241|     32|    return -1;
 1242|  4.29k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 4.29k, False: 14.2k]
  ------------------
 1243|  4.29k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 117, False: 4.18k]
  ------------------
 1244|    117|      return -1;
 1245|  4.18k|    break;
 1246|  4.18k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 2.83k, False: 15.6k]
  ------------------
 1247|  2.83k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 4, False: 2.82k]
  |  Branch (1247:29): [True: 7, False: 2.82k]
  ------------------
 1248|     11|      return -1;
 1249|  2.82k|    break;
 1250|  18.5k|  }
 1251|  18.3k|  return result;
 1252|  18.5k|}
xmltok.c:utf8_toUtf8:
  366|  6.25M|            char **toP, const char *toLim) {
  367|  6.25M|  bool input_incomplete = false;
  368|  6.25M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  6.25M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  6.25M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  6.25M|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.25M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  6.25M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 13.7k, False: 6.24M]
  ------------------
  375|  13.7k|    fromLim = *fromP + bytesStorable;
  376|  13.7k|    output_exhausted = true;
  377|  13.7k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  6.25M|  {
  381|  6.25M|    const char *const fromLimBefore = fromLim;
  382|  6.25M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  6.25M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 1.99k, False: 6.25M]
  ------------------
  384|  1.99k|      input_incomplete = true;
  385|  1.99k|    }
  386|  6.25M|  }
  387|       |
  388|  6.25M|  {
  389|  6.25M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  6.25M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  6.25M|    *fromP += bytesToCopy;
  392|  6.25M|    *toP += bytesToCopy;
  393|  6.25M|  }
  394|       |
  395|  6.25M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 13.7k, False: 6.24M]
  ------------------
  396|  13.7k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  6.24M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 6.24M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  6.24M|  else
  400|  6.24M|    return XML_CONVERT_COMPLETED;
  401|  6.25M|}
xmltok.c:utf8_isName2:
  140|  94.3k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|  94.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  94.3k|#  define UNUSED_P(p) (void)p
  ------------------
  142|  94.3k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|  94.3k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  94.3k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  94.3k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|  94.3k|}
xmltok.c:utf8_isName3:
  146|  1.10M|utf8_isName3(const ENCODING *enc, const char *p) {
  147|  1.10M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.10M|#  define UNUSED_P(p) (void)p
  ------------------
  148|  1.10M|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|  1.10M|  (namingBitmap                                                                \
  |  |   97|  1.10M|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  1.10M|         << 3)                                                                 \
  |  |   99|  1.10M|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  1.10M|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|  1.10M|}
xmltok.c:isNever:
  133|     93|isNever(const ENCODING *enc, const char *p) {
  134|     93|  UNUSED_P(enc);
  ------------------
  |  |  135|     93|#  define UNUSED_P(p) (void)p
  ------------------
  135|     93|  UNUSED_P(p);
  ------------------
  |  |  135|     93|#  define UNUSED_P(p) (void)p
  ------------------
  136|     93|  return 0;
  137|     93|}
xmltok.c:utf8_isNmstrt2:
  154|  85.4k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|  85.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  85.4k|#  define UNUSED_P(p) (void)p
  ------------------
  156|  85.4k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|  85.4k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  85.4k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  85.4k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|  85.4k|}
xmltok.c:utf8_isNmstrt3:
  160|  10.4k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  10.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.4k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  10.4k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  10.4k|  (namingBitmap                                                                \
  |  |   97|  10.4k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  10.4k|         << 3)                                                                 \
  |  |   99|  10.4k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  10.4k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  10.4k|}
xmltok.c:utf8_isInvalid2:
  168|   227k|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|   227k|  UNUSED_P(enc);
  ------------------
  |  |  135|   227k|#  define UNUSED_P(p) (void)p
  ------------------
  170|   227k|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|   227k|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 29, False: 227k]
  |  |  |  Branch (113:19): [True: 102, False: 227k]
  |  |  |  Branch (113:43): [True: 75, False: 227k]
  |  |  ------------------
  ------------------
  171|   227k|}
xmltok.c:utf8_isInvalid3:
  174|  24.5M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  24.5M|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.5M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  24.5M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  24.5M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 75, False: 24.5M]
  |  |  ------------------
  |  |  117|  24.5M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 54, False: 24.5M]
  |  |  |  Branch (117:8): [True: 115k, False: 24.4M]
  |  |  |  Branch (117:24): [True: 1.19k, False: 114k]
  |  |  ------------------
  |  |  118|  24.5M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  24.5M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 35, False: 24.5M]
  |  |  |  Branch (119:8): [True: 690k, False: 23.8M]
  |  |  ------------------
  |  |  120|  24.5M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 11, False: 690k]
  |  |  |  Branch (120:31): [True: 5, False: 690k]
  |  |  ------------------
  |  |  121|  24.5M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 12, False: 23.8M]
  |  |  ------------------
  |  |  122|  23.8M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 7, False: 23.8M]
  |  |  |  Branch (122:22): [True: 62.5k, False: 23.8M]
  |  |  ------------------
  ------------------
  177|  24.5M|}
xmltok.c:utf8_isInvalid4:
  180|  67.6k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|  67.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  67.6k|#  define UNUSED_P(p) (void)p
  ------------------
  182|  67.6k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|  67.6k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 100, False: 67.5k]
  |  |  |  Branch (125:28): [True: 59, False: 67.4k]
  |  |  |  Branch (125:55): [True: 4, False: 67.4k]
  |  |  ------------------
  |  |  126|  67.6k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 6, False: 67.4k]
  |  |  ------------------
  |  |  127|  67.6k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 54, False: 67.3k]
  |  |  |  Branch (127:8): [True: 3.36k, False: 64.0k]
  |  |  ------------------
  |  |  128|  67.4k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 11, False: 3.35k]
  |  |  |  Branch (128:31): [True: 10, False: 3.34k]
  |  |  ------------------
  |  |  129|  67.4k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 4, False: 64.0k]
  |  |  ------------------
  |  |  130|  64.0k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 29, False: 64.0k]
  |  |  |  Branch (130:22): [True: 18.8k, False: 45.2k]
  |  |  ------------------
  ------------------
  183|  67.6k|}
xmltok.c:unicode_byte_type:
  595|   123M|unicode_byte_type(char hi, char lo) {
  596|   123M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 122M, False: 1.27M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   103k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 103k, False: 123M]
  ------------------
  599|   419k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 315k, False: 123M]
  ------------------
  600|   577k|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 158k, False: 123M]
  ------------------
  601|  1.15M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 574k, False: 123M]
  ------------------
  602|  1.15M|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|     92|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 92, False: 123M]
  ------------------
  605|    182|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 90, False: 123M]
  ------------------
  606|    282|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 100, False: 123M]
  ------------------
  607|    383|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 101, False: 123M]
  ------------------
  608|    383|    return BT_TRAIL;
  609|   120k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 120k, False: 123M]
  ------------------
  610|   120k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 120k, False: 214]
  ------------------
  611|    204|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 204, False: 120k]
  ------------------
  612|    214|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 10, False: 120k]
  ------------------
  613|    214|      return BT_NONXML;
  614|   120k|    }
  615|   120k|    break;
  616|   123M|  }
  617|   122M|  return BT_NONASCII;
  618|   123M|}
xmltok.c:little2_toUtf8:
  623|   261k|      char **toP, const char *toLim) {                                         \
  624|   261k|    const char *from = *fromP;                                                 \
  625|   261k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   261k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   261k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  17.6M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 17.3M, False: 257k]
  ------------------
  628|  17.3M|      int plane;                                                               \
  629|  17.3M|      unsigned char lo2;                                                       \
  630|  17.3M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  17.3M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  17.3M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  17.3M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  17.3M|      switch (hi) {                                                            \
  633|   337k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 337k, False: 17.0M]
  ------------------
  634|   337k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 318k, False: 19.2k]
  ------------------
  635|   318k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 489, False: 317k]
  ------------------
  636|    489|            *fromP = from;                                                     \
  637|    489|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    489|          }                                                                    \
  639|   318k|          *(*toP)++ = lo;                                                      \
  640|   317k|          break;                                                               \
  641|   318k|        }                                                                      \
  642|   337k|        /* fall through */                                                     \
  643|   337k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 3.93k, False: 17.3M]
  ------------------
  644|  25.9k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 2.76k, False: 17.3M]
  ------------------
  645|  27.1k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 1.26k, False: 17.3M]
  ------------------
  646|  32.5k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 5.38k, False: 17.3M]
  ------------------
  647|  34.3k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 1.78k, False: 17.3M]
  ------------------
  648|  79.1k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 44.8k, False: 17.3M]
  ------------------
  649|  80.4k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.26k, False: 17.3M]
  ------------------
  650|  80.4k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 137, False: 80.3k]
  ------------------
  651|    137|          *fromP = from;                                                       \
  652|    137|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    137|        }                                                                      \
  654|  80.4k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  80.3k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  80.3k|        break;                                                                 \
  657|  16.8M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 16.8M, False: 559k]
  ------------------
  658|  16.8M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 2.11k, False: 16.8M]
  ------------------
  659|  2.11k|          *fromP = from;                                                       \
  660|  2.11k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  2.11k|        }                                                                      \
  662|  16.8M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  16.8M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  16.8M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  16.8M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  16.8M|        break;                                                                 \
  667|  16.8M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 10.0k, False: 17.3M]
  ------------------
  668|  72.5k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 62.4k, False: 17.3M]
  ------------------
  669|  89.6k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 17.1k, False: 17.3M]
  ------------------
  670|   161k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 71.3k, False: 17.3M]
  ------------------
  671|   161k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 623, False: 160k]
  ------------------
  672|    623|          *fromP = from;                                                       \
  673|    623|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    623|        }                                                                      \
  675|   161k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 160k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   160k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   160k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   160k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   160k|        from += 2;                                                             \
  683|   160k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|   160k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|   160k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|   160k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|   160k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   160k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   160k|        break;                                                                 \
  688|  17.3M|      }                                                                        \
  689|  17.3M|    }                                                                          \
  690|   261k|    *fromP = from;                                                             \
  691|   257k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 257k]
  ------------------
  692|   257k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   257k|    else                                                                       \
  694|   257k|      return XML_CONVERT_COMPLETED;                                            \
  695|   257k|  }
xmltok.c:getEncodingIndex:
 1502|  33.3k|getEncodingIndex(const char *name) {
 1503|  33.3k|  static const char *const encodingNames[] = {
 1504|  33.3k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  33.3k|  };
 1506|  33.3k|  int i;
 1507|  33.3k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 16.6k, False: 16.6k]
  ------------------
 1508|  16.6k|    return NO_ENC;
 1509|   100k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 100k, False: 29]
  ------------------
 1510|   100k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 16.6k, False: 83.4k]
  ------------------
 1511|  16.6k|      return i;
 1512|     29|  return UNKNOWN_ENC;
 1513|  16.6k|}
xmltok.c:streqci:
 1005|   100k|streqci(const char *s1, const char *s2) {
 1006|   516k|  for (;;) {
 1007|   516k|    char c1 = *s1++;
 1008|   516k|    char c2 = *s2++;
 1009|   516k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   516k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    250|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 250, False: 516k]
  |  Branch (1009:26): [True: 250, False: 0]
  ------------------
 1010|    250|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    250|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    250|#define ASCII_a 0x61
  ------------------
 1011|   516k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   516k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 516k]
  |  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|   516k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 83.4k, False: 433k]
  ------------------
 1018|  83.4k|      return 0;
 1019|   433k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 16.6k, False: 416k]
  ------------------
 1020|  16.6k|      break;
 1021|   433k|  }
 1022|  16.6k|  return 1;
 1023|   100k|}
xmltok.c:initScan:
 1531|  16.6k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  16.6k|  const ENCODING **encPtr;
 1533|       |
 1534|  16.6k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 16.6k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  16.6k|  encPtr = enc->encPtr;
 1537|  16.6k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 13, False: 16.6k]
  ------------------
 1538|       |    /* only a single byte available for auto-detection */
 1539|       |#ifndef XML_DTD /* FIXME */
 1540|       |    /* a well-formed document entity must have more than one byte */
 1541|       |    if (state != XML_CONTENT_STATE)
 1542|       |      return XML_TOK_PARTIAL;
 1543|       |#endif
 1544|       |    /* so we're parsing an external text entity... */
 1545|       |    /* if UTF-16 was externally specified, then we need at least 2 bytes */
 1546|     13|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     13|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 0, False: 13]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 13]
  ------------------
 1548|     13|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 13, False: 0]
  ------------------
 1549|     13|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 13]
  ------------------
 1550|     13|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     13|    }
 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|  16.6k|  } else {
 1564|  16.6k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|     21|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 21, False: 16.6k]
  ------------------
 1566|     21|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|     21|#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: 21]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|     21|      *nextTokPtr = ptr + 2;
 1569|     21|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|     21|      return XML_TOK_BOM;
  ------------------
  |  |   79|     21|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  4.48k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 4.48k, False: 12.1k]
  ------------------
 1573|  4.48k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  4.48k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 4.48k]
  ------------------
 1574|  4.48k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  4.48k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 4.48k]
  ------------------
 1575|  4.48k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 0]
  ------------------
 1576|      0|        break;
 1577|  4.48k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  4.48k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  4.48k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      1|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 1, False: 16.6k]
  ------------------
 1580|      1|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      1|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1580:11): [True: 0, False: 1]
  |  Branch (1580:52): [True: 0, False: 0]
  ------------------
 1581|      0|        break;
 1582|      1|      *nextTokPtr = ptr + 2;
 1583|      1|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|      1|      return XML_TOK_BOM;
  ------------------
  |  |   79|      1|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|  5.78k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 5.78k, False: 10.8k]
  ------------------
 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|  5.78k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  5.78k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 5.78k]
  ------------------
 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|  5.78k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 5.78k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  5.78k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 5.76k, False: 25]
  ------------------
 1602|  5.76k|        *nextTokPtr = ptr + 3;
 1603|  5.76k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  5.76k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  5.76k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  5.76k|      }
 1606|     25|      break;
 1607|  6.34k|    default:
  ------------------
  |  Branch (1607:5): [True: 6.34k, False: 10.2k]
  ------------------
 1608|  6.34k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 5.39k, False: 952]
  ------------------
 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|  5.39k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  10.7k|#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: 5.39k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  5.39k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  5.39k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.39k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  5.39k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 806, False: 146]
  ------------------
 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|    806|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    806|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 806]
  ------------------
 1630|      0|          break;
 1631|    806|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    806|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    806|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    806|      }
 1634|    146|      break;
 1635|  16.6k|    }
 1636|  16.6k|  }
 1637|    171|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|    171|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|    171|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    171|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  16.6k|}
xmltok.c:big2_toUtf8:
  623|   160k|      char **toP, const char *toLim) {                                         \
  624|   160k|    const char *from = *fromP;                                                 \
  625|   160k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   160k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   160k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  29.7M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 29.6M, False: 156k]
  ------------------
  628|  29.6M|      int plane;                                                               \
  629|  29.6M|      unsigned char lo2;                                                       \
  630|  29.6M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  29.6M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  29.6M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  29.6M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  29.6M|      switch (hi) {                                                            \
  633|   296k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 296k, False: 29.3M]
  ------------------
  634|   296k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 272k, False: 23.7k]
  ------------------
  635|   272k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 381, False: 272k]
  ------------------
  636|    381|            *fromP = from;                                                     \
  637|    381|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    381|          }                                                                    \
  639|   272k|          *(*toP)++ = lo;                                                      \
  640|   272k|          break;                                                               \
  641|   272k|        }                                                                      \
  642|   296k|        /* fall through */                                                     \
  643|   296k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 5.47k, False: 29.6M]
  ------------------
  644|  34.0k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 4.76k, False: 29.6M]
  ------------------
  645|  35.6k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 1.67k, False: 29.6M]
  ------------------
  646|  37.9k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 2.28k, False: 29.6M]
  ------------------
  647|  39.3k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 1.35k, False: 29.6M]
  ------------------
  648|  62.7k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 23.4k, False: 29.6M]
  ------------------
  649|  64.0k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.24k, False: 29.6M]
  ------------------
  650|  64.0k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 254, False: 63.7k]
  ------------------
  651|    254|          *fromP = from;                                                       \
  652|    254|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    254|        }                                                                      \
  654|  64.0k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  63.7k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  63.7k|        break;                                                                 \
  657|  29.2M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 29.2M, False: 400k]
  ------------------
  658|  29.2M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 2.62k, False: 29.2M]
  ------------------
  659|  2.62k|          *fromP = from;                                                       \
  660|  2.62k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  2.62k|        }                                                                      \
  662|  29.2M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  29.2M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  29.2M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  29.2M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  29.2M|        break;                                                                 \
  667|  29.2M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 12.5k, False: 29.6M]
  ------------------
  668|  35.2k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 22.6k, False: 29.6M]
  ------------------
  669|  48.2k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 13.0k, False: 29.6M]
  ------------------
  670|  63.4k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 15.1k, False: 29.6M]
  ------------------
  671|  63.4k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 114, False: 63.3k]
  ------------------
  672|    114|          *fromP = from;                                                       \
  673|    114|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    114|        }                                                                      \
  675|  63.4k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 63.3k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|  63.3k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|  63.3k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|  63.3k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|  63.3k|        from += 2;                                                             \
  683|  63.3k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|  63.3k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|  63.3k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|  63.3k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|  63.3k|                     | (lo2 >> 6) | 0x80);                                     \
  686|  63.3k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|  63.3k|        break;                                                                 \
  688|  29.6M|      }                                                                        \
  689|  29.6M|    }                                                                          \
  690|   160k|    *fromP = from;                                                             \
  691|   156k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 156k]
  ------------------
  692|   156k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   156k|    else                                                                       \
  694|   156k|      return XML_CONVERT_COMPLETED;                                            \
  695|   156k|  }
xmltok.c:initUpdatePosition:
 1027|     14|                   POSITION *pos) {
 1028|     14|  UNUSED_P(enc);
  ------------------
  |  |  135|     14|#  define UNUSED_P(p) (void)p
  ------------------
 1029|     14|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|     14|}
xmltok.c:doParseXmlDecl:
 1155|    278|               const ENCODING **encoding, int *standalone) {
 1156|    278|  const char *val = NULL;
 1157|    278|  const char *name = NULL;
 1158|    278|  const char *nameEnd = NULL;
 1159|    278|  ptr += 5 * enc->minBytesPerChar;
 1160|    278|  end -= 2 * enc->minBytesPerChar;
 1161|    278|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 168, False: 110]
  ------------------
 1162|    278|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 12, False: 98]
  ------------------
 1163|    180|    *badPtr = ptr;
 1164|    180|    return 0;
 1165|    180|  }
 1166|     98|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|     98|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 4, False: 94]
  ------------------
 1167|      4|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 4, False: 0]
  ------------------
 1168|      4|      *badPtr = name;
 1169|      4|      return 0;
 1170|      4|    }
 1171|     94|  } else {
 1172|     94|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 94, False: 0]
  ------------------
 1173|     94|      *versionPtr = val;
 1174|     94|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 94, False: 0]
  ------------------
 1175|     94|      *versionEndPtr = ptr;
 1176|     94|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 11, False: 83]
  ------------------
 1177|     11|      *badPtr = ptr;
 1178|     11|      return 0;
 1179|     11|    }
 1180|     83|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 3, False: 80]
  ------------------
 1181|      3|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 3]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|      3|      return 1;
 1187|      3|    }
 1188|     83|  }
 1189|     80|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     80|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 37, False: 43]
  |  |  ------------------
  ------------------
 1190|     37|    int c = toAscii(enc, val, end);
 1191|     37|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     37|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     21|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     16|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     15|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 21, False: 16]
  |  Branch (1191:28): [True: 21, False: 0]
  |  Branch (1191:48): [True: 15, False: 1]
  |  Branch (1191:64): [True: 14, False: 1]
  ------------------
 1192|      2|      *badPtr = val;
 1193|      2|      return 0;
 1194|      2|    }
 1195|     35|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 35, False: 0]
  ------------------
 1196|     35|      *encodingName = val;
 1197|     35|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 35, False: 0]
  ------------------
 1198|     35|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     35|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 8, False: 27]
  ------------------
 1200|      8|      *badPtr = ptr;
 1201|      8|      return 0;
 1202|      8|    }
 1203|     27|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 26, False: 1]
  ------------------
 1204|     26|      return 1;
 1205|     27|  }
 1206|     44|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|     88|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 5, False: 39]
  ------------------
 1207|     44|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 39]
  ------------------
 1208|      5|    *badPtr = name;
 1209|      5|    return 0;
 1210|      5|  }
 1211|     39|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     39|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 23, False: 16]
  |  |  ------------------
  ------------------
 1212|     23|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 23, False: 0]
  ------------------
 1213|     23|      *standalone = 1;
 1214|     23|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     16|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 15, False: 1]
  |  |  ------------------
  ------------------
 1215|     15|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 15, False: 0]
  ------------------
 1216|     15|      *standalone = 0;
 1217|     15|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    477|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 439, False: 38]
  ------------------
 1222|    439|    ptr += enc->minBytesPerChar;
 1223|     38|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 5, False: 33]
  ------------------
 1224|      5|    *badPtr = ptr;
 1225|      5|    return 0;
 1226|      5|  }
 1227|     33|  return 1;
 1228|     38|}
xmltok.c:parsePseudoAttribute:
 1061|    407|                     const char **valPtr, const char **nextTokPtr) {
 1062|    407|  int c;
 1063|    407|  char open;
 1064|    407|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 31, False: 376]
  ------------------
 1065|     31|    *namePtr = NULL;
 1066|     31|    return 1;
 1067|     31|  }
 1068|    376|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 6, False: 370]
  ------------------
 1069|      6|    *nextTokPtr = ptr;
 1070|      6|    return 0;
 1071|      6|  }
 1072|    729|  do {
 1073|    729|    ptr += enc->minBytesPerChar;
 1074|    729|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 359, False: 370]
  ------------------
 1075|    370|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 10, False: 360]
  ------------------
 1076|     10|    *namePtr = NULL;
 1077|     10|    return 1;
 1078|     10|  }
 1079|    360|  *namePtr = ptr;
 1080|  2.18k|  for (;;) {
 1081|  2.18k|    c = toAscii(enc, ptr, end);
 1082|  2.18k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 35, False: 2.15k]
  ------------------
 1083|     35|      *nextTokPtr = ptr;
 1084|     35|      return 0;
 1085|     35|    }
 1086|  2.15k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.15k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 286, False: 1.86k]
  ------------------
 1087|    286|      *nameEndPtr = ptr;
 1088|    286|      break;
 1089|    286|    }
 1090|  1.86k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 39, False: 1.82k]
  ------------------
 1091|     39|      *nameEndPtr = ptr;
 1092|    497|      do {
 1093|    497|        ptr += enc->minBytesPerChar;
 1094|    497|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 458, False: 39]
  ------------------
 1095|     39|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     39|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 31, False: 8]
  ------------------
 1096|     31|        *nextTokPtr = ptr;
 1097|     31|        return 0;
 1098|     31|      }
 1099|      8|      break;
 1100|     39|    }
 1101|  1.82k|    ptr += enc->minBytesPerChar;
 1102|  1.82k|  }
 1103|    294|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 3, False: 291]
  ------------------
 1104|      3|    *nextTokPtr = ptr;
 1105|      3|    return 0;
 1106|      3|  }
 1107|    291|  ptr += enc->minBytesPerChar;
 1108|    291|  c = toAscii(enc, ptr, end);
 1109|  1.49k|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 1.20k, False: 291]
  ------------------
 1110|  1.20k|    ptr += enc->minBytesPerChar;
 1111|  1.20k|    c = toAscii(enc, ptr, end);
 1112|  1.20k|  }
 1113|    291|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    582|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     71|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 71, False: 220]
  |  Branch (1113:26): [True: 32, False: 39]
  ------------------
 1114|     32|    *nextTokPtr = ptr;
 1115|     32|    return 0;
 1116|     32|  }
 1117|    259|  open = (char)c;
 1118|    259|  ptr += enc->minBytesPerChar;
 1119|    259|  *valPtr = ptr;
 1120|  2.59k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.59k|    c = toAscii(enc, ptr, end);
 1122|  2.59k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 179, False: 2.41k]
  ------------------
 1123|    179|      break;
 1124|  2.41k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  2.41k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    384|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  2.03k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    930|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 384, False: 2.03k]
  |  Branch (1124:28): [True: 380, False: 4]
  |  Branch (1124:48): [True: 930, False: 1.10k]
  |  Branch (1124:64): [True: 698, False: 232]
  ------------------
 1125|  2.41k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.33k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    675|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  3.31k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 675, False: 662]
  |  Branch (1125:31): [True: 437, False: 238]
  |  Branch (1125:48): [True: 601, False: 299]
  ------------------
 1126|  2.41k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  3.01k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    305|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 305, False: 296]
  |  Branch (1126:32): [True: 80, False: 225]
  ------------------
 1127|     80|      *nextTokPtr = ptr;
 1128|     80|      return 0;
 1129|     80|    }
 1130|  2.41k|  }
 1131|    179|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    179|  return 1;
 1133|    259|}
xmltok.c:toAscii:
 1033|  8.39k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  8.39k|  char buf[1];
 1035|  8.39k|  char *p = buf;
 1036|  8.39k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  8.39k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  8.39k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 190, False: 8.20k]
  ------------------
 1038|    190|    return -1;
 1039|  8.20k|  else
 1040|  8.20k|    return buf[0];
 1041|  8.39k|}
xmltok.c:isSpace:
 1044|  5.44k|isSpace(int c) {
 1045|  5.44k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 2.57k, False: 2.87k]
  ------------------
 1046|    521|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 521, False: 4.92k]
  ------------------
 1047|    832|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 311, False: 5.13k]
  ------------------
 1048|  1.34k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 510, False: 4.93k]
  ------------------
 1049|  2.87k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 1.52k, False: 3.91k]
  ------------------
 1050|  2.87k|    return 1;
 1051|  5.44k|  }
 1052|  2.57k|  return 0;
 1053|  5.44k|}

xmltok.c:normal_prologTok:
 1018|  3.68M|                  const char **nextTokPtr) {
 1019|  3.68M|  int tok;
 1020|  3.68M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 779, False: 3.68M]
  ------------------
 1021|    779|    return XML_TOK_NONE;
  ------------------
  |  |   51|    779|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  3.68M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  3.68M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|      0|    size_t n = end - ptr;
 1024|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1024:9): [True: 0, False: 0]
  ------------------
 1025|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1026|      0|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 0, False: 0]
  ------------------
 1027|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|      0|      end = ptr + n;
 1029|      0|    }
 1030|      0|  }
 1031|  3.68M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.68M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.68M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  1.83k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.83k, False: 3.68M]
  ------------------
 1033|  1.83k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.83k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.83k|#  define MINBPC(enc) 1
  ------------------
 1034|  9.26k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 9.26k, False: 3.67M]
  ------------------
 1035|  9.26k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  9.26k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  9.26k|#  define MINBPC(enc) 1
  ------------------
 1036|  24.8k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 24.8k, False: 3.66M]
  ------------------
 1037|  24.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  24.8k|#  define MINBPC(enc) 1
  ------------------
 1038|  24.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  24.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  24.8k|    {                                                                          \
  |  |  |  |  135|  24.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  24.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  24.8k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 24.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  24.8k|    }
  |  |  ------------------
  ------------------
 1039|  24.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  24.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  24.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 14, False: 24.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  19.2k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 19.2k, False: 5.57k]
  ------------------
 1041|  19.2k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  19.2k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  19.2k|#  define MINBPC(enc) 1
  ------------------
 1042|  2.63k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.63k, False: 22.1k]
  ------------------
 1043|  2.63k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.63k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.63k|#  define MINBPC(enc) 1
  ------------------
 1044|  1.99k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.99k, False: 22.8k]
  ------------------
 1045|  2.85k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 864, False: 23.9k]
  ------------------
 1046|  2.85k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 24.8k]
  ------------------
 1047|  2.88k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 30, False: 24.7k]
  ------------------
 1048|  2.91k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 25, False: 24.8k]
  ------------------
 1049|  2.91k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 6, False: 24.8k]
  ------------------
 1050|  2.91k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  2.91k|#  define MINBPC(enc) 1
  ------------------
 1051|  2.91k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  2.91k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  24.8k|    }
 1053|     14|    *nextTokPtr = ptr;
 1054|     14|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
 1055|  24.8k|  }
 1056|   152k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 152k, False: 3.53M]
  ------------------
 1057|   152k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|   152k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 66, False: 152k]
  ------------------
 1058|     66|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     66|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     66|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     66|    }
 1062|       |    /* fall through */
 1063|   233k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 81.4k, False: 3.60M]
  ------------------
 1064|   247k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 13.3k, False: 3.67M]
  ------------------
 1065|   252k|    for (;;) {
 1066|   252k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   252k|#  define MINBPC(enc) 1
  ------------------
 1067|   252k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   252k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   252k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   252k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 387, False: 252k]
  ------------------
 1068|    387|        break;
 1069|   252k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   252k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   252k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  2.06k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 2.06k, False: 250k]
  ------------------
 1071|  2.78k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 722, False: 251k]
  ------------------
 1072|  2.78k|        break;
 1073|  2.80k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 2.80k, False: 249k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  2.80k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|  2.80k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 2.79k, False: 10]
  ------------------
 1076|  2.79k|          break;
 1077|       |        /* fall through */
 1078|   246k|      default:
  ------------------
  |  Branch (1078:7): [True: 246k, False: 5.58k]
  ------------------
 1079|   246k|        *nextTokPtr = ptr;
 1080|   246k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   246k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   252k|      }
 1082|   252k|    }
 1083|    387|    *nextTokPtr = ptr;
 1084|    387|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    387|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.29k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.29k, False: 3.68M]
  ------------------
 1086|  2.29k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.29k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.29k|#  define MINBPC(enc) 1
  ------------------
 1087|  14.4k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 14.4k, False: 3.67M]
  ------------------
 1088|  14.4k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  14.4k|#  define MINBPC(enc) 1
  ------------------
 1089|  14.4k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  14.4k|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.06k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.06k, False: 3.68M]
  ------------------
 1091|  2.06k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.06k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.06k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.06k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    765|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 765, False: 3.68M]
  ------------------
 1094|    765|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    765|#  define MINBPC(enc) 1
  ------------------
 1095|    765|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    765|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    765|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|    765|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 4, False: 761]
  ------------------
 1096|      4|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      4|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    761|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|    761|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 13, False: 748]
  |  |  ------------------
  ------------------
 1098|     13|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     13|    {                                                                          \
  |  |  135|     13|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     13|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     13|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 12]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     13|    }
  ------------------
 1099|     12|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     12|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 11]
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     12|    }
 1104|    759|    *nextTokPtr = ptr;
 1105|    759|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    759|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  3.01M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 3.01M, False: 668k]
  ------------------
 1107|  3.01M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.01M|#  define MINBPC(enc) 1
  ------------------
 1108|  3.01M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  3.01M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|   101k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 101k, False: 3.58M]
  ------------------
 1110|   101k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   101k|#  define MINBPC(enc) 1
  ------------------
 1111|   101k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   101k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   101k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   101k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 17, False: 101k]
  ------------------
 1112|     17|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     17|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|   101k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   101k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   101k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 13, False: 101k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  1.25k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 1.25k, False: 99.8k]
  ------------------
 1115|  1.25k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.25k|#  define MINBPC(enc) 1
  ------------------
 1116|  1.25k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  1.25k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  13.9k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 13.9k, False: 87.1k]
  ------------------
 1118|  13.9k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  13.9k|#  define MINBPC(enc) 1
  ------------------
 1119|  13.9k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  13.9k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  28.5k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 28.5k, False: 72.5k]
  ------------------
 1121|  28.5k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  28.5k|#  define MINBPC(enc) 1
  ------------------
 1122|  28.5k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  28.5k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    529|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 529, False: 100k]
  ------------------
 1124|    758|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 229, False: 100k]
  ------------------
 1125|  54.5k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 53.7k, False: 47.3k]
  ------------------
 1126|  54.7k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 205, False: 100k]
  ------------------
 1127|  54.9k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 203, False: 100k]
  ------------------
 1128|  55.3k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 451, False: 100k]
  ------------------
 1129|  57.3k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.95k, False: 99.1k]
  ------------------
 1130|  57.3k|      *nextTokPtr = ptr;
 1131|  57.3k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  57.3k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|   101k|    }
 1133|     13|    *nextTokPtr = ptr;
 1134|     13|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
 1135|  18.7k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 18.7k, False: 3.66M]
  ------------------
 1136|  18.7k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  18.7k|#  define MINBPC(enc) 1
  ------------------
 1137|  18.7k|    return XML_TOK_OR;
  ------------------
  |  |   88|  18.7k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  16.4k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 16.4k, False: 3.66M]
  ------------------
 1139|  16.4k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  16.4k|#  define MINBPC(enc) 1
  ------------------
 1140|  16.4k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  16.4k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  54.9k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 54.9k, False: 3.63M]
  ------------------
 1142|  54.9k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  54.9k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  54.9k|#  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|  3.36k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      4|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 927, False: 3.68M]
  |  |  ------------------
  |  | 1145|    927|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 925]
  |  |  ------------------
  |  | 1146|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    925|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    925|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    925|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 921]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      4|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      4|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      4|    }                                                                          \
  |  | 1151|    925|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    921|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    921|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 327, False: 594]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    327|      ptr += n;                                                                \
  |  | 1153|    327|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    327|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    327|      break;                                                                   \
  |  | 1155|    327|    }                                                                          \
  |  | 1156|    921|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    594|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    594|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 590, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    590|      ptr += n;                                                                \
  |  | 1158|    590|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    590|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    590|      break;                                                                   \
  |  | 1160|    590|    }                                                                          \
  |  | 1161|    594|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      4|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  1.65k|    LEAD_CASE(3)
  ------------------
  |  | 1144|     11|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 453, False: 3.68M]
  |  |  ------------------
  |  | 1145|    453|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 448]
  |  |  ------------------
  |  | 1146|     11|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    448|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    448|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    448|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 33, False: 415]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     33|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     33|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     33|    }                                                                          \
  |  | 1151|    448|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    415|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    415|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 75, False: 340]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|     75|      ptr += n;                                                                \
  |  | 1153|     75|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|     75|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|     75|      break;                                                                   \
  |  | 1155|     75|    }                                                                          \
  |  | 1156|    415|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    340|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    340|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 329, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    329|      ptr += n;                                                                \
  |  | 1158|    329|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    329|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    329|      break;                                                                   \
  |  | 1160|    329|    }                                                                          \
  |  | 1161|    340|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     11|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    110|    LEAD_CASE(4)
  ------------------
  |  | 1144|     11|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 45, False: 3.68M]
  |  |  ------------------
  |  | 1145|     45|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 43]
  |  |  ------------------
  |  | 1146|     11|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     43|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     43|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     43|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 32, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     32|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     32|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     32|    }                                                                          \
  |  | 1151|     43|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     11|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     11|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     11|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     11|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     11|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  93.9k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 93.9k, False: 3.59M]
  ------------------
 1168|   157k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 63.9k, False: 3.62M]
  ------------------
 1169|   157k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   157k|#define XML_TOK_NAME 18
  ------------------
 1170|   157k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   157k|#  define MINBPC(enc) 1
  ------------------
 1171|   157k|    break;
 1172|    745|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 745, False: 3.68M]
  ------------------
 1173|  14.5k|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 13.7k, False: 3.67M]
  ------------------
 1174|  14.8k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 354, False: 3.68M]
  ------------------
 1175|  14.8k|#  ifdef XML_NS
 1176|  14.8k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 3.68M]
  ------------------
 1177|  14.8k|#  endif
 1178|  14.8k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  14.8k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  14.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  14.8k|#  define MINBPC(enc) 1
  ------------------
 1180|  14.8k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 3.68M]
  ------------------
 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|     61|  default:
  ------------------
  |  Branch (1193:3): [True: 61, False: 3.68M]
  ------------------
 1194|     61|    *nextTokPtr = ptr;
 1195|     61|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     61|#define XML_TOK_INVALID 0
  ------------------
 1196|  3.68M|  }
 1197|  4.59M|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  4.59M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.59M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.59M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  13.3M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  4.42M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.59M]
  |  |  ------------------
  |  |   82|  4.42M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  4.42M|    /* fall through */                                                         \
  |  |   87|  4.42M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 111k, False: 4.48M]
  |  |  ------------------
  |  |   88|  4.37M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.26M, False: 332k]
  |  |  ------------------
  |  |   89|  4.41M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 41.5k, False: 4.55M]
  |  |  ------------------
  |  |   90|  4.42M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 3.27k, False: 4.59M]
  |  |  ------------------
  |  |   91|  4.42M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 487, False: 4.59M]
  |  |  ------------------
  |  |   92|  4.42M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  4.42M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  4.42M|    break;                                                                     \
  |  |   94|  4.42M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.71k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.73k, False: 4.59M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.73k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.73k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.71k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.73k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.47k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.73k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.71k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.71k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 1.71k]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|  1.73k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.71k|    break;
  |  |  ------------------
  |  |   95|  1.71k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    290|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 304, False: 4.59M]
  |  |  |  |  ------------------
  |  |  |  |   71|    304|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 300]
  |  |  |  |  ------------------
  |  |  |  |   72|    290|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    300|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    600|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    300|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 293]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    293|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    293|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 290]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|    300|    ptr += n;                                                                  \
  |  |  |  |   78|    290|    break;
  |  |  ------------------
  |  |   96|    290|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 17, False: 4.59M]
  |  |  |  |  ------------------
  |  |  |  |   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: 13, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      3|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|  8.33k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 8.33k, False: 4.58M]
  ------------------
 1201|  76.7k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 68.4k, False: 4.52M]
  ------------------
 1202|  77.2k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 422, False: 4.59M]
  ------------------
 1203|  94.2k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 17.0k, False: 4.58M]
  ------------------
 1204|  96.3k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.05k, False: 4.59M]
  ------------------
 1205|  96.3k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 8, False: 4.59M]
  ------------------
 1206|   105k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 8.78k, False: 4.58M]
  ------------------
 1207|   166k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 60.9k, False: 4.53M]
  ------------------
 1208|   173k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 7.30k, False: 4.59M]
  ------------------
 1209|   173k|      *nextTokPtr = ptr;
 1210|   173k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 4.59M]
  ------------------
 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|    265|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 265, False: 4.59M]
  ------------------
 1232|    265|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    265|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 264]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    264|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    264|#  define MINBPC(enc) 1
  ------------------
 1237|    264|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    264|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    104|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 104, False: 4.59M]
  ------------------
 1239|    104|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    104|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 103]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    103|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    103|#  define MINBPC(enc) 1
  ------------------
 1244|    103|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    103|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|     56|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 56, False: 4.59M]
  ------------------
 1246|     56|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     56|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 55]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|     55|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|     55|#  define MINBPC(enc) 1
  ------------------
 1251|     55|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|     55|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     71|    default:
  ------------------
  |  Branch (1252:5): [True: 71, False: 4.59M]
  ------------------
 1253|     71|      *nextTokPtr = ptr;
 1254|     71|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     71|#define XML_TOK_INVALID 0
  ------------------
 1255|  4.59M|    }
 1256|  4.59M|  }
 1257|    181|  return -tok;
 1258|   174k|}
xmltok.c:normal_scanLit:
  984|  11.1k|                const char **nextTokPtr) {
  985|  15.1M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  15.1M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  15.1M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  15.1M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  15.1M|    switch (t) {
  988|  7.06k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.40k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.38k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.40k, False: 15.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.40k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 1.39k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.38k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.39k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.39k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.39k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 1.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     12|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     12|    }                                                                          \
  |  |  |  |   56|  1.39k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.38k|    break;
  |  |  ------------------
  |  |   61|  1.38k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.11k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.11k, False: 15.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.11k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.11k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.11k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.11k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.11k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  1.11k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.11k|    break;
  |  |  ------------------
  |  |   62|  1.11k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    987|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 996, False: 15.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|    996|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 994]
  |  |  |  |  ------------------
  |  |  |  |   51|    987|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    994|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    994|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    994|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 987]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|    994|    ptr += n;                                                                  \
  |  |  |  |   57|    987|    break;
  |  |  ------------------
  |  |   63|    987|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 16, False: 15.1M]
  |  |  ------------------
  |  |   64|     21|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 5, False: 15.1M]
  |  |  ------------------
  |  |   65|     25|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 15.1M]
  |  |  ------------------
  |  |   66|     25|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     25|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  3.81k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 3.81k, False: 15.1M]
  ------------------
  990|  13.3k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 9.51k, False: 15.1M]
  ------------------
  991|  13.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  13.3k|#  define MINBPC(enc) 1
  ------------------
  992|  13.3k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 2.33k, False: 10.9k]
  ------------------
  993|  2.33k|        break;
  994|  10.9k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  10.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  10.9k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 7, False: 10.9k]
  ------------------
  995|      7|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      7|#define XML_TOK_LITERAL 27
  ------------------
  996|  10.9k|      *nextTokPtr = ptr;
  997|  10.9k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  3.18k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 3.18k, False: 7.80k]
  ------------------
  999|  3.96k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 779, False: 10.2k]
  ------------------
 1000|  6.14k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 2.17k, False: 8.81k]
  ------------------
 1001|  10.9k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 4.81k, False: 6.17k]
  ------------------
 1002|  10.9k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 17, False: 10.9k]
  ------------------
 1003|  10.9k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 8, False: 10.9k]
  ------------------
 1004|  10.9k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  10.9k|#define XML_TOK_LITERAL 27
  ------------------
 1005|      8|      default:
  ------------------
  |  Branch (1005:7): [True: 8, False: 10.9k]
  ------------------
 1006|      8|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
 1007|  10.9k|      }
 1008|  15.1M|    default:
  ------------------
  |  Branch (1008:5): [True: 15.1M, False: 16.8k]
  ------------------
 1009|  15.1M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  15.1M|#  define MINBPC(enc) 1
  ------------------
 1010|  15.1M|      break;
 1011|  15.1M|    }
 1012|  15.1M|  }
 1013|     52|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     52|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  11.1k|}
xmltok.c:normal_scanDecl:
  183|  19.2k|                 const char **nextTokPtr) {
  184|  19.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  19.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  19.2k|    {                                                                          \
  |  |  |  |  135|  19.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  19.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  19.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 19.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  19.2k|    }
  |  |  ------------------
  ------------------
  185|  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)])
  |  |  ------------------
  ------------------
  186|    206|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 206, False: 19.0k]
  ------------------
  187|    206|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    206|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    206|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 19.2k]
  ------------------
  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|    576|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 576, False: 18.6k]
  ------------------
  192|  19.0k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 18.4k, False: 788]
  ------------------
  193|  19.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  19.0k|#  define MINBPC(enc) 1
  ------------------
  194|  19.0k|    break;
  195|      5|  default:
  ------------------
  |  Branch (195:3): [True: 5, False: 19.2k]
  ------------------
  196|      5|    *nextTokPtr = ptr;
  197|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  198|  19.2k|  }
  199|   136k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   136k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   136k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   136k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|     14|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 14, False: 136k]
  ------------------
  202|     14|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     14|    {                                                                          \
  |  |  135|     14|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     14|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     14|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 13]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     14|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     13|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|     13|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|     13|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 9, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 12]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 12]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 12]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 12]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     13|      }
  212|       |      /* fall through */
  213|  9.65k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 9.64k, False: 126k]
  ------------------
  214|  16.4k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 6.75k, False: 129k]
  ------------------
  215|  18.9k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 2.55k, False: 133k]
  ------------------
  216|  18.9k|      *nextTokPtr = ptr;
  217|  18.9k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  18.9k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   102k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 102k, False: 33.7k]
  ------------------
  219|   117k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 14.7k, False: 121k]
  ------------------
  220|   117k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   117k|#  define MINBPC(enc) 1
  ------------------
  221|   117k|      break;
  222|     44|    default:
  ------------------
  |  Branch (222:5): [True: 44, False: 136k]
  ------------------
  223|     44|      *nextTokPtr = ptr;
  224|     44|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     44|#define XML_TOK_INVALID 0
  ------------------
  225|   136k|    }
  226|   136k|  }
  227|     32|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  19.0k|}
xmltok.c:normal_scanComment:
  146|    742|                    const char **nextTokPtr) {
  147|    742|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    742|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    742|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|    742|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 735, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    735|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|    735|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 9, False: 726]
  ------------------
  149|      9|      *nextTokPtr = ptr;
  150|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  151|      9|    }
  152|    726|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    726|#  define MINBPC(enc) 1
  ------------------
  153|  3.37M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  3.37M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.37M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.37M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  6.68M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  4.31k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.29k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.31k, False: 3.36M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.31k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 4.30k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.29k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.30k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.30k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.30k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 4.29k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     10|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     10|    }                                                                          \
  |  |  |  |   56|  4.30k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.29k|    break;
  |  |  ------------------
  |  |   61|  3.33M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.33M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.33M, False: 41.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.33M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 3.33M]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.33M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.33M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.33M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.33M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3.33M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  3.33M|    ptr += n;                                                                  \
  |  |  |  |   57|  3.33M|    break;
  |  |  ------------------
  |  |   62|  3.33M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.77k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.77k, False: 3.36M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.77k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 5.77k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.77k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.77k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.77k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.77k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 5.77k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  5.77k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.77k|    break;
  |  |  ------------------
  |  |   63|  5.77k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 10, False: 3.37M]
  |  |  ------------------
  |  |   64|     12|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 3.37M]
  |  |  ------------------
  |  |   65|     14|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 3.37M]
  |  |  ------------------
  |  |   66|     14|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     14|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.31k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.31k, False: 3.37M]
  ------------------
  157|  1.31k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.31k|#  define MINBPC(enc) 1
  ------------------
  158|  1.31k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.31k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.31k|    {                                                                          \
  |  |  |  |  135|  1.31k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.31k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.31k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  1.31k|    }
  |  |  ------------------
  ------------------
  159|  1.30k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.30k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 614, False: 695]
  |  |  ------------------
  ------------------
  160|    614|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    614|#  define MINBPC(enc) 1
  ------------------
  161|    614|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    614|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    614|    {                                                                          \
  |  |  |  |  135|    614|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    614|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|    614|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 613]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    614|    }
  |  |  ------------------
  ------------------
  162|    613|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|    613|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 18, False: 595]
  ------------------
  163|     18|            *nextTokPtr = ptr;
  164|     18|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  165|     18|          }
  166|    595|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    595|#  define MINBPC(enc) 1
  ------------------
  167|    595|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    595|#define XML_TOK_COMMENT 13
  ------------------
  168|    613|        }
  169|    695|        break;
  170|  30.2k|      default:
  ------------------
  |  Branch (170:7): [True: 30.2k, False: 3.34M]
  ------------------
  171|  30.2k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  30.2k|#  define MINBPC(enc) 1
  ------------------
  172|  30.2k|        break;
  173|  3.37M|      }
  174|  3.37M|    }
  175|    726|  }
  176|     76|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     76|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    742|}
xmltok.c:normal_scanPi:
  277|  10.1k|               const char **nextTokPtr) {
  278|  10.1k|  int tok;
  279|  10.1k|  const char *target = ptr;
  280|  10.1k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  10.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  10.1k|    {                                                                          \
  |  |  |  |  135|  10.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  10.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  10.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  10.1k|    }
  |  |  ------------------
  ------------------
  281|  10.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  12.2k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.77k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 10.0k]
  |  |  ------------------
  |  |  111|  5.77k|    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.77k|    /* fall through */                                                         \
  |  |  116|  5.77k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.63k, False: 6.45k]
  |  |  ------------------
  |  |  117|  5.77k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.14k, False: 7.95k]
  |  |  ------------------
  |  |  118|  5.77k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.77k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  5.77k|    break;                                                                     \
  |  |  120|  5.77k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  3.50k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3.51k, False: 6.58k]
  |  |  |  |  ------------------
  |  |  |  |  100|  3.51k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3.50k]
  |  |  |  |  ------------------
  |  |  |  |  101|  3.50k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  3.50k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.01k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.50k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 3.50k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  3.50k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.50k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 6, False: 3.50k]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|  3.50k|    ptr += n;                                                                  \
  |  |  |  |  107|  3.50k|    break;
  |  |  ------------------
  |  |  121|  3.50k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    785|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 798, False: 9.29k]
  |  |  |  |  ------------------
  |  |  |  |  100|    798|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 796]
  |  |  |  |  ------------------
  |  |  |  |  101|    785|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    796|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.59k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    796|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 793]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    793|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    793|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 8, False: 785]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|    796|    ptr += n;                                                                  \
  |  |  |  |  107|    785|    break;
  |  |  ------------------
  |  |  122|    785|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 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;
  |  |  ------------------
  ------------------
  283|      3|  default:
  ------------------
  |  Branch (283:3): [True: 3, False: 10.0k]
  ------------------
  284|      3|    *nextTokPtr = ptr;
  285|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  286|  10.0k|  }
  287|  52.9k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  52.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  52.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  52.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|   136k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  31.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 52.9k]
  |  |  ------------------
  |  |   82|  31.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|  31.9k|    /* fall through */                                                         \
  |  |   87|  31.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 22.9k, False: 30.0k]
  |  |  ------------------
  |  |   88|  29.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.96k, False: 46.0k]
  |  |  ------------------
  |  |   89|  30.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 746, False: 52.2k]
  |  |  ------------------
  |  |   90|  31.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 431, False: 52.5k]
  |  |  ------------------
  |  |   91|  31.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 872, False: 52.1k]
  |  |  ------------------
  |  |   92|  31.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  31.9k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  31.9k|    break;                                                                     \
  |  |   94|  31.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.81k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.82k, False: 51.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.82k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.82k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.81k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.82k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.65k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.82k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 1.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.82k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.82k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 1.81k]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|  1.82k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.81k|    break;
  |  |  ------------------
  |  |   95|  9.19k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  9.17k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9.19k, False: 43.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|  9.19k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 9.19k]
  |  |  |  |  ------------------
  |  |  |  |   72|  9.17k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  9.19k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  18.3k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.19k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 9.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  9.18k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.18k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 18, False: 9.17k]
  |  |  |  |  ------------------
  |  |  |  |   74|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|  9.19k|    ptr += n;                                                                  \
  |  |  |  |   78|  9.17k|    break;
  |  |  ------------------
  |  |   96|  9.17k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 52.9k]
  |  |  |  |  ------------------
  |  |  |  |   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: 9, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      5|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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.17k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.17k, False: 51.8k]
  ------------------
  291|  2.39k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 1.22k, False: 51.7k]
  ------------------
  292|  3.79k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.39k, False: 51.5k]
  ------------------
  293|  3.79k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.79k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 3.79k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  3.79k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.79k|#  define MINBPC(enc) 1
  ------------------
  298|  3.48M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  3.48M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.48M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.48M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  6.51M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  4.83k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.82k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.83k, False: 3.48M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.83k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 4.83k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.82k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.83k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.83k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.83k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 4.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  4.83k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.82k|    break;
  |  |  ------------------
  |  |   61|  3.24M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.24M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.24M, False: 242k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.24M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 3.24M]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.24M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.24M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.24M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.24M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 3.24M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|  3.24M|    ptr += n;                                                                  \
  |  |  |  |   57|  3.24M|    break;
  |  |  ------------------
  |  |   62|  3.24M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.98k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.98k, False: 3.48M]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.98k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 3.98k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.98k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.98k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.98k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.98k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 3.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  3.98k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.98k|    break;
  |  |  ------------------
  |  |   63|  3.98k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 13, False: 3.48M]
  |  |  ------------------
  |  |   64|     16|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 3, False: 3.48M]
  |  |  ------------------
  |  |   65|     19|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 3.48M]
  |  |  ------------------
  |  |   66|     19|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     19|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  5.68k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 5.68k, False: 3.48M]
  ------------------
  302|  5.68k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.68k|#  define MINBPC(enc) 1
  ------------------
  303|  5.68k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.68k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.68k|    {                                                                          \
  |  |  |  |  135|  5.68k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.68k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 5.67k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  5.68k|    }
  |  |  ------------------
  ------------------
  304|  5.67k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  5.67k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.65k, False: 2.02k]
  |  |  ------------------
  ------------------
  305|  3.65k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.65k|#  define MINBPC(enc) 1
  ------------------
  306|  3.65k|            return tok;
  307|  3.65k|          }
  308|  2.02k|          break;
  309|   227k|        default:
  ------------------
  |  Branch (309:9): [True: 227k, False: 3.26M]
  ------------------
  310|   227k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   227k|#  define MINBPC(enc) 1
  ------------------
  311|   227k|          break;
  312|  3.48M|        }
  313|  3.48M|      }
  314|     97|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     97|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  6.15k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 6.15k, False: 46.8k]
  ------------------
  316|  6.15k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  6.15k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 6.15k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  6.15k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.15k|#  define MINBPC(enc) 1
  ------------------
  321|  6.15k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.15k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.15k|    {                                                                          \
  |  |  |  |  135|  6.15k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.15k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.15k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 19, False: 6.13k]
  |  |  |  |  ------------------
  |  |  |  |  136|     19|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     19|      }                                                                        \
  |  |  |  |  138|  6.15k|    }
  |  |  ------------------
  ------------------
  322|  6.13k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  6.13k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.11k, False: 21]
  |  |  ------------------
  ------------------
  323|  6.11k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.11k|#  define MINBPC(enc) 1
  ------------------
  324|  6.11k|        return tok;
  325|  6.11k|      }
  326|       |      /* fall through */
  327|     39|    default:
  ------------------
  |  Branch (327:5): [True: 18, False: 52.9k]
  ------------------
  328|     39|      *nextTokPtr = ptr;
  329|     39|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
  330|  52.9k|    }
  331|  52.9k|  }
  332|     51|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     51|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  10.0k|}
xmltok.c:normal_checkPiTarget:
  232|  9.94k|                      int *tokPtr) {
  233|  9.94k|  int upper = 0;
  234|  9.94k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.94k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  9.94k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  9.94k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  9.94k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  9.94k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 7.28k, False: 2.66k]
  ------------------
  237|  7.28k|    return 1;
  238|  2.66k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.66k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|    887|  case ASCII_x:
  ------------------
  |  |   86|    887|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 887, False: 1.77k]
  ------------------
  240|    887|    break;
  241|    910|  case ASCII_X:
  ------------------
  |  |   59|    910|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 910, False: 1.75k]
  ------------------
  242|    910|    upper = 1;
  243|    910|    break;
  244|    865|  default:
  ------------------
  |  Branch (244:3): [True: 865, False: 1.79k]
  ------------------
  245|    865|    return 1;
  246|  2.66k|  }
  247|  1.79k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.79k|#  define MINBPC(enc) 1
  ------------------
  248|  1.79k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.79k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    896|  case ASCII_m:
  ------------------
  |  |   75|    896|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 896, False: 901]
  ------------------
  250|    896|    break;
  251|    473|  case ASCII_M:
  ------------------
  |  |   48|    473|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 473, False: 1.32k]
  ------------------
  252|    473|    upper = 1;
  253|    473|    break;
  254|    428|  default:
  ------------------
  |  Branch (254:3): [True: 428, False: 1.36k]
  ------------------
  255|    428|    return 1;
  256|  1.79k|  }
  257|  1.36k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.36k|#  define MINBPC(enc) 1
  ------------------
  258|  1.36k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.36k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    230|  case ASCII_l:
  ------------------
  |  |   74|    230|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 230, False: 1.13k]
  ------------------
  260|    230|    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.13k|  default:
  ------------------
  |  Branch (264:3): [True: 1.13k, False: 232]
  ------------------
  265|  1.13k|    return 1;
  266|  1.36k|  }
  267|    232|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 229]
  ------------------
  268|      3|    return 0;
  269|    229|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    229|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    229|  return 1;
  271|    232|}
xmltok.c:normal_scanPercent:
  924|  2.30k|                    const char **nextTokPtr) {
  925|  2.30k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.30k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.30k|    {                                                                          \
  |  |  |  |  135|  2.30k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.30k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 20, False: 2.28k]
  |  |  |  |  ------------------
  |  |  |  |  136|     20|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     20|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     20|      }                                                                        \
  |  |  |  |  138|  2.30k|    }
  |  |  ------------------
  ------------------
  926|  2.28k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.28k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.28k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|    517|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    676|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.28k]
  |  |  ------------------
  |  |  111|    676|    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|    676|    /* fall through */                                                         \
  |  |  116|    676|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 363, False: 1.92k]
  |  |  ------------------
  |  |  117|    676|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 313, False: 1.97k]
  |  |  ------------------
  |  |  118|    676|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|    676|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|    676|    break;                                                                     \
  |  |  120|    676|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|     19|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 38, False: 2.24k]
  |  |  |  |  ------------------
  |  |  |  |  100|     38|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 37]
  |  |  |  |  ------------------
  |  |  |  |  101|     19|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     37|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     74|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     37|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     21|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     37|    ptr += n;                                                                  \
  |  |  |  |  107|     19|    break;
  |  |  ------------------
  |  |  121|     30|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|     25|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 30, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  100|     30|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 29]
  |  |  |  |  ------------------
  |  |  |  |  101|     25|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     29|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     58|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     29|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 26]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     26|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     26|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 25]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|     29|    ptr += n;                                                                  \
  |  |  |  |  107|     25|    break;
  |  |  ------------------
  |  |  122|     25|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 2.27k]
  |  |  |  |  ------------------
  |  |  |  |  100|     11|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 9]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     18|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      2|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|      9|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    147|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 147, False: 2.13k]
  ------------------
  929|    521|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 374, False: 1.90k]
  ------------------
  930|  1.51k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 997, False: 1.28k]
  ------------------
  931|  1.52k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 5, False: 2.27k]
  ------------------
  932|  1.52k|    *nextTokPtr = ptr;
  933|  1.52k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.52k|#define XML_TOK_PERCENT 22
  ------------------
  934|      5|  default:
  ------------------
  |  Branch (934:3): [True: 5, False: 2.27k]
  ------------------
  935|      5|    *nextTokPtr = ptr;
  936|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  937|  2.28k|  }
  938|  5.16k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  5.16k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.16k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  11.1k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  4.04k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 5.16k]
  |  |  ------------------
  |  |   82|  4.04k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  4.04k|    /* fall through */                                                         \
  |  |   87|  4.04k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.20k, False: 3.95k]
  |  |  ------------------
  |  |   88|  1.68k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 477, False: 4.69k]
  |  |  ------------------
  |  |   89|  3.44k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.76k, False: 3.40k]
  |  |  ------------------
  |  |   90|  3.81k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 366, False: 4.80k]
  |  |  ------------------
  |  |   91|  4.04k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 225, False: 4.94k]
  |  |  ------------------
  |  |   92|  4.04k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  4.04k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  4.04k|    break;                                                                     \
  |  |   94|  4.04k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    220|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 237, False: 4.93k]
  |  |  |  |  ------------------
  |  |  |  |   71|    237|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 6, False: 231]
  |  |  |  |  ------------------
  |  |  |  |   72|    220|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    231|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    462|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    231|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, 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: 2, False: 220]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    231|    ptr += n;                                                                  \
  |  |  |  |   78|    220|    break;
  |  |  ------------------
  |  |   95|    270|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    256|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 270, False: 4.89k]
  |  |  |  |  ------------------
  |  |  |  |   71|    270|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 269]
  |  |  |  |  ------------------
  |  |  |  |   72|    256|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    269|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    538|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    269|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 263]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    263|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    263|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 7, False: 256]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    269|    ptr += n;                                                                  \
  |  |  |  |   78|    256|    break;
  |  |  ------------------
  |  |   96|    256|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 5.15k]
  |  |  |  |  ------------------
  |  |  |  |   71|      9|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 8]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 7, 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|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|      8|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|    588|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 588, False: 4.57k]
  ------------------
  942|    588|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    588|#  define MINBPC(enc) 1
  ------------------
  943|    588|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    588|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     23|    default:
  ------------------
  |  Branch (944:5): [True: 23, False: 5.14k]
  ------------------
  945|     23|      *nextTokPtr = ptr;
  946|     23|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  947|  5.16k|    }
  948|  5.16k|  }
  949|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    720|}
xmltok.c:normal_scanPoundName:
  954|  54.9k|                      const char **nextTokPtr) {
  955|  54.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  54.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  54.9k|    {                                                                          \
  |  |  |  |  135|  54.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  54.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  54.9k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 54.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  54.9k|    }
  |  |  ------------------
  ------------------
  956|  54.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  54.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  54.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  54.8k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  54.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 54.9k]
  |  |  ------------------
  |  |  111|  54.9k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  54.9k|    /* fall through */                                                         \
  |  |  116|  54.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 54.7k, False: 205]
  |  |  ------------------
  |  |  117|  54.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 159, False: 54.8k]
  |  |  ------------------
  |  |  118|  54.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  54.9k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  54.9k|    break;                                                                     \
  |  |  120|  54.9k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      6|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 54.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     36|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     18|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     11|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      6|    break;
  |  |  ------------------
  |  |  121|     12|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      5|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 54.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      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: 3, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      5|    break;
  |  |  ------------------
  |  |  122|     14|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 54.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      2|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      1|  default:
  ------------------
  |  Branch (958:3): [True: 1, False: 54.9k]
  ------------------
  959|      1|    *nextTokPtr = ptr;
  960|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  961|  54.9k|  }
  962|   391k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   391k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   391k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   391k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|  1.22M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   335k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 391k]
  |  |  ------------------
  |  |   82|   335k|    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|   335k|    /* fall through */                                                         \
  |  |   87|   335k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 219k, False: 171k]
  |  |  ------------------
  |  |   88|   332k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 112k, False: 278k]
  |  |  ------------------
  |  |   89|   335k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 2.29k, False: 388k]
  |  |  ------------------
  |  |   90|   335k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 410, False: 390k]
  |  |  ------------------
  |  |   91|   335k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 235, False: 390k]
  |  |  ------------------
  |  |   92|   335k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   335k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   335k|    break;                                                                     \
  |  |   94|   335k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    248|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 263, False: 390k]
  |  |  |  |  ------------------
  |  |  |  |   71|    263|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 261]
  |  |  |  |  ------------------
  |  |  |  |   72|    248|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    261|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    522|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    261|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 249]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    249|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    249|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 248]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    261|    ptr += n;                                                                  \
  |  |  |  |   78|    248|    break;
  |  |  ------------------
  |  |   95|    279|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    258|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 279, False: 390k]
  |  |  |  |  ------------------
  |  |  |  |   71|    279|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 275]
  |  |  |  |  ------------------
  |  |  |  |   72|    258|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    275|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    550|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    275|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 266]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    266|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    266|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 8, False: 258]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|    275|    ptr += n;                                                                  \
  |  |  |  |   78|    258|    break;
  |  |  ------------------
  |  |   96|    258|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 25, False: 390k]
  |  |  |  |  ------------------
  |  |  |  |   71|     25|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 21]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 20, 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|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|     21|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|  52.7k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 52.7k, False: 338k]
  ------------------
  966|  52.8k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 101, False: 390k]
  ------------------
  967|  53.3k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 521, False: 390k]
  ------------------
  968|  53.3k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 38, False: 390k]
  ------------------
  969|  54.7k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 1.36k, False: 389k]
  ------------------
  970|  54.7k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 391k]
  ------------------
  971|  54.7k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 43, False: 390k]
  ------------------
  972|  54.7k|      *nextTokPtr = ptr;
  973|  54.7k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  54.7k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     13|    default:
  ------------------
  |  Branch (974:5): [True: 13, False: 391k]
  ------------------
  975|     13|      *nextTokPtr = ptr;
  976|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  977|   391k|    }
  978|   391k|  }
  979|     65|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     65|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  54.9k|}
xmltok.c:normal_contentTok:
  824|  4.36M|                   const char **nextTokPtr) {
  825|  4.36M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 87.2k, False: 4.28M]
  ------------------
  826|  87.2k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  87.2k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  4.28M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  4.28M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|      0|    size_t n = end - ptr;
  829|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (829:9): [True: 0, False: 0]
  ------------------
  830|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  831|      0|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 0, False: 0]
  ------------------
  832|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|      0|      end = ptr + n;
  834|      0|    }
  835|      0|  }
  836|  4.28M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.28M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.28M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  3.68M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 3.68M, False: 595k]
  ------------------
  838|  3.68M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.68M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.68M|#  define MINBPC(enc) 1
  ------------------
  839|  91.9k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 91.9k, False: 4.18M]
  ------------------
  840|  91.9k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  91.9k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  91.9k|#  define MINBPC(enc) 1
  ------------------
  841|  15.6k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 15.6k, False: 4.26M]
  ------------------
  842|  15.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  15.6k|#  define MINBPC(enc) 1
  ------------------
  843|  15.6k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  15.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  15.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  15.6k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 17, False: 15.6k]
  ------------------
  844|     17|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     17|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  15.6k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  15.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  15.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 10.1k, False: 5.50k]
  ------------------
  846|  10.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.1k|#  define MINBPC(enc) 1
  ------------------
  847|  15.6k|    *nextTokPtr = ptr;
  848|  15.6k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  15.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  38.8k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 38.8k, False: 4.24M]
  ------------------
  850|  38.8k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  38.8k|#  define MINBPC(enc) 1
  ------------------
  851|  38.8k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  38.8k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  10.6k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 10.6k, False: 4.27M]
  ------------------
  853|  10.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.6k|#  define MINBPC(enc) 1
  ------------------
  854|  10.6k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  10.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  10.6k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 506, False: 10.1k]
  ------------------
  855|    506|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    506|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  10.1k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  10.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 2.78k, False: 7.39k]
  ------------------
  857|  2.78k|      break;
  858|  7.39k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.39k|#  define MINBPC(enc) 1
  ------------------
  859|  7.39k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.39k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  7.39k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 311, False: 7.08k]
  ------------------
  860|    311|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    311|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  7.08k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  7.08k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 7.08k, False: 1]
  ------------------
  862|  7.08k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  7.08k|#  define MINBPC(enc) 1
  ------------------
  863|  7.08k|      break;
  864|  7.08k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  47.7k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.59k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.55k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.59k, False: 4.28M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.59k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 11, False: 1.58k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.55k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     11|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.58k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.58k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.58k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 26, False: 1.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     26|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     26|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     26|    }                                                                          \
  |  |  |  |   56|  1.58k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.55k|    break;
  |  |  ------------------
  |  |   61|  14.8k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  14.7k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 14.8k, False: 4.26M]
  |  |  |  |  ------------------
  |  |  |  |   50|  14.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 11, False: 14.7k]
  |  |  |  |  ------------------
  |  |  |  |   51|  14.7k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     11|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  14.7k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  14.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  14.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 20, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     20|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     20|    }                                                                          \
  |  |  |  |   56|  14.7k|    ptr += n;                                                                  \
  |  |  |  |   57|  14.7k|    break;
  |  |  ------------------
  |  |   62|  14.7k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.39k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.41k, False: 4.27M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.41k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 7.41k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.39k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.41k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.41k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.41k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 24, False: 7.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     24|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     24|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     24|    }                                                                          \
  |  |  |  |   56|  7.41k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.39k|    break;
  |  |  ------------------
  |  |   63|  7.39k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 69, False: 4.28M]
  |  |  ------------------
  |  |   64|     77|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 8, False: 4.28M]
  |  |  ------------------
  |  |   65|     90|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 13, False: 4.28M]
  |  |  ------------------
  |  |   66|     90|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     90|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     90|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|   414k|  default:
  ------------------
  |  Branch (868:3): [True: 414k, False: 3.86M]
  ------------------
  869|   414k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   414k|#  define MINBPC(enc) 1
  ------------------
  870|   414k|    break;
  871|  4.28M|  }
  872|  25.6M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  25.6M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  25.6M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  25.6M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  874|      0|#  define LEAD_CASE(n)                                                         \
  875|      0|  case BT_LEAD##n:                                                             \
  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  877|      0|      *nextTokPtr = ptr;                                                       \
  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  879|      0|    }                                                                          \
  880|      0|    ptr += n;                                                                  \
  881|      0|    break;
  882|  17.7k|      LEAD_CASE(2)
  ------------------
  |  |  875|  17.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 17.7k, False: 25.6M]
  |  |  ------------------
  |  |  876|  17.7k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  17.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  17.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 15, False: 17.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 9, False: 17.7k]
  |  |  ------------------
  |  |  877|     24|      *nextTokPtr = ptr;                                                       \
  |  |  878|     24|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     24|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     24|    }                                                                          \
  |  |  880|  17.7k|    ptr += n;                                                                  \
  |  |  881|  17.7k|    break;
  ------------------
  883|  6.00M|      LEAD_CASE(3)
  ------------------
  |  |  875|  6.00M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 6.00M, False: 19.6M]
  |  |  ------------------
  |  |  876|  6.00M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  6.00M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  6.00M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 17, False: 6.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 8, False: 6.00M]
  |  |  ------------------
  |  |  877|     25|      *nextTokPtr = ptr;                                                       \
  |  |  878|     25|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     25|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     25|    }                                                                          \
  |  |  880|  6.00M|    ptr += n;                                                                  \
  |  |  881|  6.00M|    break;
  ------------------
  884|  31.5k|      LEAD_CASE(4)
  ------------------
  |  |  875|  31.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 31.5k, False: 25.6M]
  |  |  ------------------
  |  |  876|  31.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  31.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  31.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 21, False: 31.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 3, False: 31.5k]
  |  |  ------------------
  |  |  877|     24|      *nextTokPtr = ptr;                                                       \
  |  |  878|     24|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     24|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     24|    }                                                                          \
  |  |  880|  31.5k|    ptr += n;                                                                  \
  |  |  881|  31.5k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  41.3k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 41.3k, False: 25.5M]
  ------------------
  887|  41.3k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  41.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  41.3k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 41.0k, False: 237]
  |  |  ------------------
  ------------------
  888|  41.0k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|  41.0k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 21.3k, False: 19.7k]
  ------------------
  889|  21.3k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  21.3k|#  define MINBPC(enc) 1
  ------------------
  890|  21.3k|          break;
  891|  21.3k|        }
  892|  19.7k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  19.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  19.7k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 19.4k, False: 310]
  |  |  ------------------
  ------------------
  893|  19.4k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  19.4k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 19.4k, False: 11]
  ------------------
  894|  19.4k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  19.4k|#  define MINBPC(enc) 1
  ------------------
  895|  19.4k|            break;
  896|  19.4k|          }
  897|     11|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|     11|#  define MINBPC(enc) 1
  ------------------
  898|     11|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  899|  19.4k|        }
  900|  19.7k|      }
  901|       |      /* fall through */
  902|  19.9k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 19.4k, False: 25.6M]
  ------------------
  903|   337k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 317k, False: 25.3M]
  ------------------
  904|   337k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 38, False: 25.6M]
  ------------------
  905|   337k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 3, False: 25.6M]
  ------------------
  906|   337k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 5, False: 25.6M]
  ------------------
  907|   341k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 3.39k, False: 25.6M]
  ------------------
  908|   372k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 31.2k, False: 25.6M]
  ------------------
  909|   372k|      *nextTokPtr = ptr;
  910|   372k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   372k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  19.1M|    default:
  ------------------
  |  Branch (911:5): [True: 19.1M, False: 6.46M]
  ------------------
  912|  19.1M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  19.1M|#  define MINBPC(enc) 1
  ------------------
  913|  19.1M|      break;
  914|  25.6M|    }
  915|  25.6M|  }
  916|  75.8k|  *nextTokPtr = ptr;
  917|  75.8k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  75.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|   448k|}
xmltok.c:normal_scanLt:
  726|  3.68M|               const char **nextTokPtr) {
  727|  3.68M|#  ifdef XML_NS
  728|  3.68M|  int hadColon;
  729|  3.68M|#  endif
  730|  3.68M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.68M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.68M|    {                                                                          \
  |  |  |  |  135|  3.68M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.68M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.68M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 23, False: 3.68M]
  |  |  |  |  ------------------
  |  |  |  |  136|     23|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     23|      }                                                                        \
  |  |  |  |  138|  3.68M|    }
  |  |  ------------------
  ------------------
  731|  3.68M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.68M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.68M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  3.55M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.60M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.68M]
  |  |  ------------------
  |  |  111|  3.60M|    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.60M|    /* fall through */                                                         \
  |  |  116|  3.60M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.55M, False: 133k]
  |  |  ------------------
  |  |  117|  3.60M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 56.9k, False: 3.62M]
  |  |  ------------------
  |  |  118|  3.60M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.60M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  3.60M|    break;                                                                     \
  |  |  120|  3.60M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    764|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 769, False: 3.68M]
  |  |  |  |  ------------------
  |  |  |  |  100|    769|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 767]
  |  |  |  |  ------------------
  |  |  |  |  101|    764|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    767|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.53k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    767|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 765]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    765|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    765|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 764]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    767|    ptr += n;                                                                  \
  |  |  |  |  107|    764|    break;
  |  |  ------------------
  |  |  121|  1.34k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.32k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.34k, False: 3.68M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.34k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.34k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.32k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.34k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.69k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.34k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.34k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.34k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.34k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 17, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|  1.34k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.32k|    break;
  |  |  ------------------
  |  |  122|  1.32k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 3.68M]
  |  |  |  |  ------------------
  |  |  |  |  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: 4, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      6|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 6, 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;
  |  |  ------------------
  ------------------
  733|  50.2k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 50.2k, False: 3.63M]
  ------------------
  734|  50.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  50.2k|#  define MINBPC(enc) 1
  ------------------
  735|  50.2k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  50.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  50.2k|    {                                                                          \
  |  |  |  |  135|  50.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  50.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  50.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 50.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  50.2k|    }
  |  |  ------------------
  ------------------
  736|  50.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  50.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  50.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 14, False: 50.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    536|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 536, False: 49.7k]
  ------------------
  738|    536|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    536|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    536|#  define MINBPC(enc) 1
  ------------------
  739|  49.7k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 49.7k, False: 550]
  ------------------
  740|  49.7k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  49.7k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  49.7k|#  define MINBPC(enc) 1
  ------------------
  741|  50.2k|    }
  742|     14|    *nextTokPtr = ptr;
  743|     14|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  744|  7.46k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 7.46k, False: 3.67M]
  ------------------
  745|  7.46k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  7.46k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  7.46k|#  define MINBPC(enc) 1
  ------------------
  746|  17.1k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 17.1k, False: 3.66M]
  ------------------
  747|  17.1k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  17.1k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  17.1k|#  define MINBPC(enc) 1
  ------------------
  748|     35|  default:
  ------------------
  |  Branch (748:3): [True: 35, False: 3.68M]
  ------------------
  749|     35|    *nextTokPtr = ptr;
  750|     35|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  751|  3.68M|  }
  752|  3.61M|#  ifdef XML_NS
  753|  3.61M|  hadColon = 0;
  754|  3.61M|#  endif
  755|       |  /* we have a start-tag */
  756|  3.72M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  3.72M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.72M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.72M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|   341k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   112k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.72M]
  |  |  ------------------
  |  |   82|   112k|    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|   112k|    /* fall through */                                                         \
  |  |   87|   112k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 62.3k, False: 3.66M]
  |  |  ------------------
  |  |   88|  82.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 19.6k, False: 3.71M]
  |  |  ------------------
  |  |   89|  91.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 9.60k, False: 3.72M]
  |  |  ------------------
  |  |   90|  92.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 524, False: 3.72M]
  |  |  ------------------
  |  |   91|   112k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 20.2k, False: 3.70M]
  |  |  ------------------
  |  |   92|   112k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   112k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   112k|    break;                                                                     \
  |  |   94|   112k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.05k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.06k, False: 3.72M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.06k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.06k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.05k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.06k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.12k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.06k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 1.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.05k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.05k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|  1.06k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.05k|    break;
  |  |  ------------------
  |  |   95|  5.73k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  5.70k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 5.73k, False: 3.72M]
  |  |  |  |  ------------------
  |  |  |  |   71|  5.73k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 5.73k]
  |  |  |  |  ------------------
  |  |  |  |   72|  5.70k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  5.73k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  11.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.73k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 5.72k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  5.72k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.72k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 22, False: 5.70k]
  |  |  |  |  ------------------
  |  |  |  |   74|     27|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     27|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     27|    }                                                                          \
  |  |  |  |   77|  5.73k|    ptr += n;                                                                  \
  |  |  |  |   78|  5.70k|    break;
  |  |  ------------------
  |  |   96|  5.70k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 3.72M]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 13]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     26|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      9|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|     13|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 3.72M]
  ------------------
  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|  5.88k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 5.88k, False: 3.72M]
  ------------------
  777|  6.60k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 720, False: 3.72M]
  ------------------
  778|  9.25k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 2.65k, False: 3.72M]
  ------------------
  779|  9.25k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  9.25k|#  define MINBPC(enc) 1
  ------------------
  780|  11.4k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  11.4k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  5.22k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.40k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 11.4k]
  |  |  ------------------
  |  |  111|  6.40k|    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|  6.40k|    /* fall through */                                                         \
  |  |  116|  6.40k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.39k, False: 8.03k]
  |  |  ------------------
  |  |  117|  6.40k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.01k, False: 8.41k]
  |  |  ------------------
  |  |  118|  6.40k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  6.40k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  6.40k|    break;                                                                     \
  |  |  120|  6.40k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    546|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 555, False: 10.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|    555|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 554]
  |  |  |  |  ------------------
  |  |  |  |  101|    546|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    554|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.10k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    554|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 547]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    547|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    547|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 546]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|    554|    ptr += n;                                                                  \
  |  |  |  |  107|    546|    break;
  |  |  ------------------
  |  |  121|    546|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    338|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 356, False: 11.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|    356|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 351]
  |  |  |  |  ------------------
  |  |  |  |  101|    338|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    351|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    702|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    351|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 345]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    345|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    345|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 7, False: 338]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|    351|    ptr += n;                                                                  \
  |  |  |  |  107|    338|    break;
  |  |  ------------------
  |  |  122|    338|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 8, False: 11.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|      8|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     12|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, 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|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      6|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    884|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 884, False: 10.5k]
  ------------------
  784|    884|          goto gt;
  785|  1.00k|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 1.00k, False: 10.4k]
  ------------------
  786|  1.00k|          goto sol;
  787|    385|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 385, False: 11.0k]
  ------------------
  788|    929|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 544, False: 10.8k]
  ------------------
  789|  2.20k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 1.27k, False: 10.1k]
  ------------------
  790|  2.20k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.20k|#  define MINBPC(enc) 1
  ------------------
  791|  2.20k|          continue;
  792|     16|        default:
  ------------------
  |  Branch (792:9): [True: 16, False: 11.4k]
  ------------------
  793|     16|          *nextTokPtr = ptr;
  794|     16|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  795|  11.4k|        }
  796|  7.28k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  7.28k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  11.4k|      }
  798|     31|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     31|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  9.25k|    }
  800|  3.60M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 3.60M, False: 129k]
  ------------------
  801|  3.60M|    gt:
  802|  3.60M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.60M|#  define MINBPC(enc) 1
  ------------------
  803|  3.60M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  3.60M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  1.36k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 1.36k, False: 3.72M]
  ------------------
  805|  2.36k|    sol:
  806|  2.36k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.36k|#  define MINBPC(enc) 1
  ------------------
  807|  2.36k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.36k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.36k|    {                                                                          \
  |  |  |  |  135|  2.36k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.36k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.36k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 2.35k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  2.36k|    }
  |  |  ------------------
  ------------------
  808|  2.35k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  2.35k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 12, False: 2.34k]
  ------------------
  809|     12|        *nextTokPtr = ptr;
  810|     12|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  811|     12|      }
  812|  2.34k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.34k|#  define MINBPC(enc) 1
  ------------------
  813|  2.34k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  2.34k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     25|    default:
  ------------------
  |  Branch (814:5): [True: 25, False: 3.72M]
  ------------------
  815|     25|      *nextTokPtr = ptr;
  816|     25|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  817|  3.72M|    }
  818|  3.72M|  }
  819|     67|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  3.61M|}
xmltok.c:normal_scanCdataSection:
  337|  49.7k|                         const char **nextTokPtr) {
  338|  49.7k|  static const char CDATA_LSQB[]
  339|  49.7k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  49.7k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  49.7k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  49.7k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  49.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  49.7k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  49.7k|#define ASCII_LSQB 0x5B
  ------------------
  340|  49.7k|  int i;
  341|  49.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  49.7k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  49.7k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  49.7k|    {                                                                          \
  |  |  135|  49.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  49.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  49.7k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 49.7k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  49.7k|    }
  ------------------
  344|   348k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   298k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 298k, False: 49.7k]
  ------------------
  345|   298k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|   298k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 10, False: 298k]
  ------------------
  346|     10|      *nextTokPtr = ptr;
  347|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  348|     10|    }
  349|   298k|  }
  350|  49.7k|  *nextTokPtr = ptr;
  351|  49.7k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  49.7k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  49.7k|}
xmltok.c:normal_scanEndTag:
  432|  17.1k|                   const char **nextTokPtr) {
  433|  17.1k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  17.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  17.1k|    {                                                                          \
  |  |  |  |  135|  17.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  17.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  17.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 17.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  17.1k|    }
  |  |  ------------------
  ------------------
  434|  17.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  17.1k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  17.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  16.5k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  15.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 17.1k]
  |  |  ------------------
  |  |  111|  15.7k|    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|  15.7k|    /* fall through */                                                         \
  |  |  116|  15.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 13.7k, False: 3.42k]
  |  |  ------------------
  |  |  117|  15.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.99k, False: 15.1k]
  |  |  ------------------
  |  |  118|  15.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  15.7k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  15.7k|    break;                                                                     \
  |  |  120|  15.7k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    327|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 336, False: 16.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|    336|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 335]
  |  |  |  |  ------------------
  |  |  |  |  101|    327|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    335|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    670|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    335|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 329]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    329|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    329|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 327]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|    335|    ptr += n;                                                                  \
  |  |  |  |  107|    327|    break;
  |  |  ------------------
  |  |  121|  1.09k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.08k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.09k, False: 16.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.09k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.08k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.08k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.17k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.08k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|  1.08k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.08k|    break;
  |  |  ------------------
  |  |  122|  1.08k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 17.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      8|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, 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|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|      4|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      1|  default:
  ------------------
  |  Branch (436:3): [True: 1, False: 17.1k]
  ------------------
  437|      1|    *nextTokPtr = ptr;
  438|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  439|  17.1k|  }
  440|  1.02M|  while (HAS_CHAR(enc, ptr, end)) {
  441|  1.02M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.02M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.02M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  2.01M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  5.53k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.02M]
  |  |  ------------------
  |  |   82|  5.53k|    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|  5.53k|    /* fall through */                                                         \
  |  |   87|  5.53k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.69k, False: 1.02M]
  |  |  ------------------
  |  |   88|  3.33k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.63k, False: 1.02M]
  |  |  ------------------
  |  |   89|  4.27k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 947, False: 1.02M]
  |  |  ------------------
  |  |   90|  4.89k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 620, False: 1.02M]
  |  |  ------------------
  |  |   91|  5.53k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 637, False: 1.02M]
  |  |  ------------------
  |  |   92|  5.53k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.53k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  5.53k|    break;                                                                     \
  |  |   94|  5.53k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    379|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 388, False: 1.02M]
  |  |  |  |  ------------------
  |  |  |  |   71|    388|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 387]
  |  |  |  |  ------------------
  |  |  |  |   72|    379|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    387|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    774|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    387|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 382]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    382|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    382|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 379]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|    387|    ptr += n;                                                                  \
  |  |  |  |   78|    379|    break;
  |  |  ------------------
  |  |   95|  1.00M|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.00M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.00M, False: 22.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.00M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.00M]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.00M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.00M|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.00M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.00M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.00M|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.00M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 33, False: 1.00M]
  |  |  |  |  ------------------
  |  |  |  |   74|     36|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     36|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     36|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     36|    }                                                                          \
  |  |  |  |   77|  1.00M|    ptr += n;                                                                  \
  |  |  |  |   78|  1.00M|    break;
  |  |  ------------------
  |  |   96|  1.00M|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 1.02M]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 22]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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: 1, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     21|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 21, 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;
  |  |  ------------------
  ------------------
  443|    478|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 478, False: 1.02M]
  ------------------
  444|  1.05k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 572, False: 1.02M]
  ------------------
  445|  14.3k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 13.3k, False: 1.01M]
  ------------------
  446|  29.2k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  14.3k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  14.9k|#  define MINBPC(enc) 1
  ------------------
  447|  29.2k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  29.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  29.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    670|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 670, False: 28.5k]
  ------------------
  449|  1.77k|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 1.10k, False: 28.1k]
  ------------------
  450|  14.9k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 13.1k, False: 16.0k]
  ------------------
  451|  14.9k|          break;
  452|  14.3k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 14.3k, False: 14.9k]
  ------------------
  453|  14.3k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  14.3k|#  define MINBPC(enc) 1
  ------------------
  454|  14.3k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  14.3k|#define XML_TOK_END_TAG 5
  ------------------
  455|     10|        default:
  ------------------
  |  Branch (455:9): [True: 10, False: 29.2k]
  ------------------
  456|     10|          *nextTokPtr = ptr;
  457|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  458|  29.2k|        }
  459|  29.2k|      }
  460|     33|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 1.02M]
  ------------------
  463|       |      /* no need to check qname syntax here,
  464|       |         since end-tag must match exactly */
  465|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  466|      0|      break;
  467|      0|#  endif
  468|  2.64k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 2.64k, False: 1.02M]
  ------------------
  469|  2.64k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.64k|#  define MINBPC(enc) 1
  ------------------
  470|  2.64k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  2.64k|#define XML_TOK_END_TAG 5
  ------------------
  471|     12|    default:
  ------------------
  |  Branch (471:5): [True: 12, False: 1.02M]
  ------------------
  472|     12|      *nextTokPtr = ptr;
  473|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  474|  1.02M|    }
  475|  1.02M|  }
  476|     59|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     59|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  17.1k|}
xmltok.c:normal_scanAtts:
  573|  7.28k|                 const char **nextTokPtr) {
  574|  7.28k|#  ifdef XML_NS
  575|  7.28k|  int hadColon = 0;
  576|  7.28k|#  endif
  577|  2.15M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  2.15M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.15M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.15M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  5.21M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.26M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.15M]
  |  |  ------------------
  |  |   82|  1.26M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  1.26M|    /* fall through */                                                         \
  |  |   87|  1.26M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.13M, False: 1.01M]
  |  |  ------------------
  |  |   88|  1.22M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 84.4k, False: 2.07M]
  |  |  ------------------
  |  |   89|  1.25M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 29.4k, False: 2.13M]
  |  |  ------------------
  |  |   90|  1.25M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 243, False: 2.15M]
  |  |  ------------------
  |  |   91|  1.26M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 13.3k, False: 2.14M]
  |  |  ------------------
  |  |   92|  1.26M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.26M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.26M|    break;                                                                     \
  |  |   94|  1.26M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  88.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 88.0k, False: 2.07M]
  |  |  |  |  ------------------
  |  |  |  |   71|  88.0k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 88.0k]
  |  |  |  |  ------------------
  |  |  |  |   72|  88.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  88.0k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   176k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  88.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 88.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  88.0k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  88.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 88.0k]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|  88.0k|    ptr += n;                                                                  \
  |  |  |  |   78|  88.0k|    break;
  |  |  ------------------
  |  |   95|  88.0k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  84.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 84.1k, False: 2.07M]
  |  |  |  |  ------------------
  |  |  |  |   71|  84.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 84.1k]
  |  |  |  |  ------------------
  |  |  |  |   72|  84.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  84.1k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   168k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  84.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 84.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  84.1k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  84.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 11, False: 84.0k]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|  84.1k|    ptr += n;                                                                  \
  |  |  |  |   78|  84.0k|    break;
  |  |  ------------------
  |  |   96|  84.0k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 17, False: 2.15M]
  |  |  |  |  ------------------
  |  |  |  |   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: 8, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      8|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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: 2.15M]
  ------------------
  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|  10.0k|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 10.0k, False: 2.14M]
  ------------------
  598|  10.5k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 485, False: 2.15M]
  ------------------
  599|  10.9k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 415, False: 2.15M]
  ------------------
  600|  11.8k|      for (;;) {
  601|  11.8k|        int t;
  602|       |
  603|  11.8k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  11.8k|#  define MINBPC(enc) 1
  ------------------
  604|  11.8k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.8k|    {                                                                          \
  |  |  |  |  135|  11.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  11.8k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 30, False: 11.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|     30|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     30|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     30|      }                                                                        \
  |  |  |  |  138|  11.8k|    }
  |  |  ------------------
  ------------------
  605|  11.8k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  11.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  11.8k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 10.9k, False: 918]
  ------------------
  607|  10.9k|          break;
  608|    918|        switch (t) {
  609|    481|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 481, False: 437]
  ------------------
  610|    709|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 228, False: 690]
  ------------------
  611|    906|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 197, False: 721]
  ------------------
  612|    906|          break;
  613|     12|        default:
  ------------------
  |  Branch (613:9): [True: 12, False: 906]
  ------------------
  614|     12|          *nextTokPtr = ptr;
  615|     12|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  616|    918|        }
  617|    918|      }
  618|       |      /* fall through */
  619|   720k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 709k, False: 1.45M]
  ------------------
  620|   720k|      int open;
  621|   720k|#  ifdef XML_NS
  622|   720k|      hadColon = 0;
  623|   720k|#  endif
  624|   720k|      for (;;) {
  625|   720k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   720k|#  define MINBPC(enc) 1
  ------------------
  626|   720k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   720k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   720k|    {                                                                          \
  |  |  |  |  135|   720k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   720k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   720k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 25, False: 720k]
  |  |  |  |  ------------------
  |  |  |  |  136|     25|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     25|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     25|      }                                                                        \
  |  |  |  |  138|   720k|    }
  |  |  ------------------
  ------------------
  627|   720k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|   720k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   720k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|   720k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 36.7k, False: 683k]
  |  Branch (628:32): [True: 683k, False: 655]
  ------------------
  629|   720k|          break;
  630|    655|        switch (open) {
  631|    212|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 212, False: 443]
  ------------------
  632|    427|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 215, False: 440]
  ------------------
  633|    632|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 205, False: 450]
  ------------------
  634|    632|          break;
  635|     23|        default:
  ------------------
  |  Branch (635:9): [True: 23, False: 632]
  ------------------
  636|     23|          *nextTokPtr = ptr;
  637|     23|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  638|    655|        }
  639|    655|      }
  640|   720k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   720k|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  6.08M|      for (;;) {
  643|  6.08M|        int t;
  644|  6.08M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.08M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.08M|    {                                                                          \
  |  |  |  |  135|  6.08M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.08M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.08M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 47, False: 6.08M]
  |  |  |  |  ------------------
  |  |  |  |  136|     47|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     47|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     47|      }                                                                        \
  |  |  |  |  138|  6.08M|    }
  |  |  ------------------
  ------------------
  645|  6.08M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  6.08M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.08M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  6.08M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 719k, False: 5.36M]
  ------------------
  647|   719k|          break;
  648|  5.36M|        switch (t) {
  649|  8.59M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  14.1k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  14.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 14.1k, False: 5.34M]
  |  |  |  |  ------------------
  |  |  |  |   50|  14.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 14.1k]
  |  |  |  |  ------------------
  |  |  |  |   51|  14.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  14.1k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  14.1k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  14.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 14.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  14.1k|    ptr += n;                                                                  \
  |  |  |  |   57|  14.1k|    break;
  |  |  ------------------
  |  |   61|  4.28M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.28M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.28M, False: 1.08M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.28M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 4.28M]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.28M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.28M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.28M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.28M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 4.28M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  4.28M|    ptr += n;                                                                  \
  |  |  |  |   57|  4.28M|    break;
  |  |  ------------------
  |  |   62|  4.28M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    976|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 980, False: 5.36M]
  |  |  |  |  ------------------
  |  |  |  |   50|    980|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 979]
  |  |  |  |  ------------------
  |  |  |  |   51|    976|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    979|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    979|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    979|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 976]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|    979|    ptr += n;                                                                  \
  |  |  |  |   57|    976|    break;
  |  |  ------------------
  |  |   63|    976|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 4, False: 5.36M]
  |  |  ------------------
  |  |   64|      6|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 5.36M]
  |  |  ------------------
  |  |   65|     14|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 5.36M]
  |  |  ------------------
  |  |   66|     14|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     14|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  17.8k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 17.8k, False: 5.34M]
  ------------------
  651|  17.8k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  17.8k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  17.8k|#  define MINBPC(enc) 1
  ------------------
  652|  17.8k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 17, False: 17.8k]
  ------------------
  653|     17|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 12, False: 5]
  ------------------
  654|     12|              *nextTokPtr = ptr;
  655|     17|            return tok;
  656|     17|          }
  657|  17.8k|          break;
  658|  17.8k|        }
  659|  17.8k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 24, False: 5.36M]
  ------------------
  660|     24|          *nextTokPtr = ptr;
  661|     24|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  662|  1.04M|        default:
  ------------------
  |  Branch (662:9): [True: 1.04M, False: 4.31M]
  ------------------
  663|  1.04M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.04M|#  define MINBPC(enc) 1
  ------------------
  664|  1.04M|          break;
  665|  5.36M|        }
  666|  5.36M|      }
  667|   719k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   719k|#  define MINBPC(enc) 1
  ------------------
  668|   719k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   719k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   719k|    {                                                                          \
  |  |  |  |  135|   719k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   719k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   719k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 719k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|   719k|    }
  |  |  ------------------
  ------------------
  669|   719k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   719k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   719k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|  25.5k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 25.5k, False: 694k]
  ------------------
  671|   697k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 671k, False: 48.0k]
  ------------------
  672|   715k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 18.1k, False: 701k]
  ------------------
  673|   715k|        break;
  674|    982|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 982, False: 718k]
  ------------------
  675|    982|        goto sol;
  676|  3.38k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 3.38k, False: 716k]
  ------------------
  677|  3.38k|        goto gt;
  678|     43|      default:
  ------------------
  |  Branch (678:7): [True: 43, False: 719k]
  ------------------
  679|     43|        *nextTokPtr = ptr;
  680|     43|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     43|#define XML_TOK_INVALID 0
  ------------------
  681|   719k|      }
  682|       |      /* ptr points to closing quote */
  683|   819k|      for (;;) {
  684|   819k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   819k|#  define MINBPC(enc) 1
  ------------------
  685|   819k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   819k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   819k|    {                                                                          \
  |  |  |  |  135|   819k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   819k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   819k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 23, False: 819k]
  |  |  |  |  ------------------
  |  |  |  |  136|     23|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     23|      }                                                                        \
  |  |  |  |  138|   819k|    }
  |  |  ------------------
  ------------------
  686|   819k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   819k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   819k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|   763k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   627k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 819k]
  |  |  ------------------
  |  |  111|   627k|    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|   627k|    /* fall through */                                                         \
  |  |  116|   627k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 592k, False: 226k]
  |  |  ------------------
  |  |  117|   627k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 34.7k, False: 785k]
  |  |  ------------------
  |  |  118|   627k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   627k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   627k|    break;                                                                     \
  |  |  120|   627k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  79.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 79.0k, False: 740k]
  |  |  |  |  ------------------
  |  |  |  |  100|  79.0k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 79.0k]
  |  |  |  |  ------------------
  |  |  |  |  101|  79.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  79.0k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   158k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  79.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 79.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  79.0k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  79.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 79.0k]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|  79.0k|    ptr += n;                                                                  \
  |  |  |  |  107|  79.0k|    break;
  |  |  ------------------
  |  |  121|  79.0k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  6.11k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 6.12k, False: 813k]
  |  |  |  |  ------------------
  |  |  |  |  100|  6.12k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 6.11k]
  |  |  |  |  ------------------
  |  |  |  |  101|  6.11k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  6.11k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  12.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.11k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 6.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  6.11k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.11k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 6.11k]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|  6.11k|    ptr += n;                                                                  \
  |  |  |  |  107|  6.11k|    break;
  |  |  ------------------
  |  |  122|  6.11k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 819k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 3, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     30|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, 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|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    783|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 783, False: 819k]
  ------------------
  689|   104k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 103k, False: 716k]
  ------------------
  690|   104k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 398, False: 819k]
  ------------------
  691|   104k|          continue;
  692|    332|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 332, False: 819k]
  ------------------
  693|  3.71k|        gt:
  694|  3.71k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.71k|#  define MINBPC(enc) 1
  ------------------
  695|  3.71k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  3.71k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|  2.13k|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 2.13k, False: 817k]
  ------------------
  697|  3.11k|        sol:
  698|  3.11k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.11k|#  define MINBPC(enc) 1
  ------------------
  699|  3.11k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.11k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.11k|    {                                                                          \
  |  |  |  |  135|  3.11k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.11k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.11k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 3.10k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  3.11k|    }
  |  |  ------------------
  ------------------
  700|  3.10k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.10k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 6, False: 3.10k]
  ------------------
  701|      6|            *nextTokPtr = ptr;
  702|      6|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  703|      6|          }
  704|  3.10k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.10k|#  define MINBPC(enc) 1
  ------------------
  705|  3.10k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  3.10k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      6|        default:
  ------------------
  |  Branch (706:9): [True: 6, False: 819k]
  ------------------
  707|      6|          *nextTokPtr = ptr;
  708|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  709|   819k|        }
  710|   712k|        break;
  711|   819k|      }
  712|   712k|      break;
  713|   715k|    }
  714|   712k|    default:
  ------------------
  |  Branch (714:5): [True: 24, False: 2.15M]
  ------------------
  715|     24|      *nextTokPtr = ptr;
  716|     24|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  717|  2.15M|    }
  718|  2.15M|  }
  719|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  7.28k|}
xmltok.c:normal_scanRef:
  545|   239k|                const char **nextTokPtr) {
  546|   239k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   239k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   239k|    {                                                                          \
  |  |  |  |  135|   239k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   239k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   239k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 239k]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|   239k|    }
  |  |  ------------------
  ------------------
  547|   239k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   239k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   239k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|   221k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   230k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 239k]
  |  |  ------------------
  |  |  111|   230k|    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|   230k|    /* fall through */                                                         \
  |  |  116|   230k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 219k, False: 19.7k]
  |  |  ------------------
  |  |  117|   230k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 10.3k, False: 229k]
  |  |  ------------------
  |  |  118|   230k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   230k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   230k|    break;                                                                     \
  |  |  120|   230k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    286|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 293, False: 239k]
  |  |  |  |  ------------------
  |  |  |  |  100|    293|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 291]
  |  |  |  |  ------------------
  |  |  |  |  101|    286|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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: 3, False: 288]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    288|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    288|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 286]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    291|    ptr += n;                                                                  \
  |  |  |  |  107|    286|    break;
  |  |  ------------------
  |  |  121|    299|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    294|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 299, False: 239k]
  |  |  |  |  ------------------
  |  |  |  |  100|    299|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 298]
  |  |  |  |  ------------------
  |  |  |  |  101|    294|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    298|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    596|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    298|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 295]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    295|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    295|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 294]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|    298|    ptr += n;                                                                  \
  |  |  |  |  107|    294|    break;
  |  |  ------------------
  |  |  122|    294|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 239k]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 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;
  |  |  ------------------
  ------------------
  549|  8.71k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 8.71k, False: 230k]
  ------------------
  550|  8.71k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  8.71k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  8.71k|#  define MINBPC(enc) 1
  ------------------
  551|     41|  default:
  ------------------
  |  Branch (551:3): [True: 41, False: 239k]
  ------------------
  552|     41|    *nextTokPtr = ptr;
  553|     41|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     41|#define XML_TOK_INVALID 0
  ------------------
  554|   239k|  }
  555|   269k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   269k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   269k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   269k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|   143k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  37.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 269k]
  |  |  ------------------
  |  |   82|  37.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  37.6k|    /* fall through */                                                         \
  |  |   87|  37.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 32.4k, False: 236k]
  |  |  ------------------
  |  |   88|  34.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.23k, False: 266k]
  |  |  ------------------
  |  |   89|  37.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 2.47k, False: 266k]
  |  |  ------------------
  |  |   90|  37.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 244, False: 268k]
  |  |  ------------------
  |  |   91|  37.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 219, False: 268k]
  |  |  ------------------
  |  |   92|  37.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  37.6k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  37.6k|    break;                                                                     \
  |  |   94|  37.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    279|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 290, False: 268k]
  |  |  |  |  ------------------
  |  |  |  |   71|    290|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 286]
  |  |  |  |  ------------------
  |  |  |  |   72|    279|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    286|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    572|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    286|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 280]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    280|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    280|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 279]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    286|    ptr += n;                                                                  \
  |  |  |  |   78|    279|    break;
  |  |  ------------------
  |  |   95|    441|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    433|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 441, False: 268k]
  |  |  |  |  ------------------
  |  |  |  |   71|    441|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 439]
  |  |  |  |  ------------------
  |  |  |  |   72|    433|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    439|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_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_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    435|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    435|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 433]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|    439|    ptr += n;                                                                  \
  |  |  |  |   78|    433|    break;
  |  |  ------------------
  |  |   96|    433|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 24, False: 269k]
  |  |  |  |  ------------------
  |  |  |  |   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: 19, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      3|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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|   230k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 230k, False: 38.4k]
  ------------------
  559|   230k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   230k|#  define MINBPC(enc) 1
  ------------------
  560|   230k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   230k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     35|    default:
  ------------------
  |  Branch (561:5): [True: 35, False: 269k]
  ------------------
  562|     35|      *nextTokPtr = ptr;
  563|     35|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  564|   269k|    }
  565|   269k|  }
  566|     41|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   230k|}
xmltok.c:normal_scanCharRef:
  514|  8.71k|                    const char **nextTokPtr) {
  515|  8.71k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  8.71k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.71k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  8.71k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 8.71k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  8.71k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  8.71k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.77k, False: 1.94k]
  |  |  ------------------
  ------------------
  517|  6.77k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  6.77k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  6.77k|#  define MINBPC(enc) 1
  ------------------
  518|  1.94k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.94k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.94k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  1.92k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.92k, False: 17]
  ------------------
  520|  1.92k|      break;
  521|     17|    default:
  ------------------
  |  Branch (521:5): [True: 17, False: 1.92k]
  ------------------
  522|     17|      *nextTokPtr = ptr;
  523|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  524|  1.94k|    }
  525|  5.96k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.92k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  4.05k|#  define MINBPC(enc) 1
  ------------------
  526|  5.96k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.96k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.96k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  4.05k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 4.05k, False: 1.91k]
  ------------------
  528|  4.05k|        break;
  529|  1.90k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.90k, False: 4.06k]
  ------------------
  530|  1.90k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.90k|#  define MINBPC(enc) 1
  ------------------
  531|  1.90k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.90k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     11|      default:
  ------------------
  |  Branch (532:7): [True: 11, False: 5.95k]
  ------------------
  533|     11|        *nextTokPtr = ptr;
  534|     11|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  535|  5.96k|      }
  536|  5.96k|    }
  537|  1.92k|  }
  538|      6|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  8.71k|}
xmltok.c:normal_scanHexCharRef:
  483|  6.77k|                       const char **nextTokPtr) {
  484|  6.77k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  6.77k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.77k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  6.77k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.77k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  6.77k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.77k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.77k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  4.16k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 4.16k, False: 2.61k]
  ------------------
  487|  6.76k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.60k, False: 4.17k]
  ------------------
  488|  6.76k|      break;
  489|     10|    default:
  ------------------
  |  Branch (489:5): [True: 10, False: 6.76k]
  ------------------
  490|     10|      *nextTokPtr = ptr;
  491|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  492|  6.77k|    }
  493|  23.2k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  6.76k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  16.4k|#  define MINBPC(enc) 1
  ------------------
  494|  23.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  23.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  23.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  9.59k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 9.59k, False: 13.6k]
  ------------------
  496|  16.4k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 6.88k, False: 16.3k]
  ------------------
  497|  16.4k|        break;
  498|  6.74k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 6.74k, False: 16.4k]
  ------------------
  499|  6.74k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.74k|#  define MINBPC(enc) 1
  ------------------
  500|  6.74k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  6.74k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|      8|      default:
  ------------------
  |  Branch (501:7): [True: 8, False: 23.2k]
  ------------------
  502|      8|        *nextTokPtr = ptr;
  503|      8|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  504|  23.2k|      }
  505|  23.2k|    }
  506|  6.76k|  }
  507|     12|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  6.77k|}
xmltok.c:normal_cdataSectionTok:
  356|  3.41M|                        const char **nextTokPtr) {
  357|  3.41M|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 113, False: 3.41M]
  ------------------
  358|    113|    return XML_TOK_NONE;
  ------------------
  |  |   51|    113|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  3.41M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  3.41M|#  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|  3.41M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.41M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.41M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  3.30M|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 3.30M, False: 115k]
  ------------------
  370|  3.30M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.30M|#  define MINBPC(enc) 1
  ------------------
  371|  3.30M|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.30M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.30M|    {                                                                          \
  |  |  |  |  135|  3.30M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.30M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.30M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 3.30M]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  3.30M|    }
  |  |  ------------------
  ------------------
  372|  3.30M|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  3.30M|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 220k, False: 3.08M]
  ------------------
  373|   220k|      break;
  374|  3.08M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.08M|#  define MINBPC(enc) 1
  ------------------
  375|  3.08M|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.08M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.08M|    {                                                                          \
  |  |  |  |  135|  3.08M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.08M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.08M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 3.08M]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  3.08M|    }
  |  |  ------------------
  ------------------
  376|  3.08M|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.08M|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 3.03M, False: 49.5k]
  ------------------
  377|  3.03M|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  3.03M|#  define MINBPC(enc) 1
  ------------------
  378|  3.03M|      break;
  379|  3.03M|    }
  380|  49.5k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  49.5k|#  define MINBPC(enc) 1
  ------------------
  381|  49.5k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  49.5k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  1.16k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 1.16k, False: 3.41M]
  ------------------
  383|  1.16k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.16k|#  define MINBPC(enc) 1
  ------------------
  384|  1.16k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.16k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.16k|    {                                                                          \
  |  |  |  |  135|  1.16k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.16k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.16k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 1.15k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  1.16k|    }
  |  |  ------------------
  ------------------
  385|  1.15k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.15k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 251, False: 906]
  ------------------
  386|    251|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    251|#  define MINBPC(enc) 1
  ------------------
  387|  1.15k|    *nextTokPtr = ptr;
  388|  1.15k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.15k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  64.0k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 64.0k, False: 3.35M]
  ------------------
  390|  64.0k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  64.0k|#  define MINBPC(enc) 1
  ------------------
  391|  64.0k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  64.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  64.0k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|    500|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    486|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 500, False: 3.41M]
  |  |  |  |  ------------------
  |  |  |  |   50|    500|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 497]
  |  |  |  |  ------------------
  |  |  |  |   51|    486|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    497|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    497|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    497|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 486]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|    497|    ptr += n;                                                                  \
  |  |  |  |   57|    486|    break;
  |  |  ------------------
  |  |   61|    894|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    889|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 894, False: 3.41M]
  |  |  |  |  ------------------
  |  |  |  |   50|    894|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 892]
  |  |  |  |  ------------------
  |  |  |  |   51|    889|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    892|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    892|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    892|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 889]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|    892|    ptr += n;                                                                  \
  |  |  |  |   57|    889|    break;
  |  |  ------------------
  |  |   62|  2.32k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.32k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.32k, False: 3.41M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.32k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.32k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.32k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.32k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.32k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 2.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  2.32k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.32k|    break;
  |  |  ------------------
  |  |   63|  2.32k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 3.41M]
  |  |  ------------------
  |  |   64|     14|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 5, False: 3.41M]
  |  |  ------------------
  |  |   65|     22|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 3.41M]
  |  |  ------------------
  |  |   66|     22|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     22|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  46.8k|  default:
  ------------------
  |  Branch (393:3): [True: 46.8k, False: 3.36M]
  ------------------
  394|  46.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  46.8k|#  define MINBPC(enc) 1
  ------------------
  395|  46.8k|    break;
  396|  3.41M|  }
  397|  33.7M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  33.7M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  33.7M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  33.7M|  (((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|  3.64k|      LEAD_CASE(2)
  ------------------
  |  |  400|  3.63k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 3.64k, False: 33.7M]
  |  |  ------------------
  |  |  401|  3.64k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  3.64k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.64k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 9, False: 3.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 3, False: 3.64k]
  |  |  ------------------
  |  |  402|     12|      *nextTokPtr = ptr;                                                       \
  |  |  403|     12|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     12|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     12|    }                                                                          \
  |  |  405|  3.63k|    ptr += n;                                                                  \
  |  |  406|  3.63k|    break;
  ------------------
  408|  6.57M|      LEAD_CASE(3)
  ------------------
  |  |  400|  6.57M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 6.57M, False: 27.1M]
  |  |  ------------------
  |  |  401|  6.57M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  6.57M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  6.57M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 2, False: 6.57M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 2, False: 6.57M]
  |  |  ------------------
  |  |  402|      4|      *nextTokPtr = ptr;                                                       \
  |  |  403|      4|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      4|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      4|    }                                                                          \
  |  |  405|  6.57M|    ptr += n;                                                                  \
  |  |  406|  6.57M|    break;
  ------------------
  409|  14.3k|      LEAD_CASE(4)
  ------------------
  |  |  400|  14.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 14.3k, False: 33.7M]
  |  |  ------------------
  |  |  401|  14.3k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  14.3k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 3, False: 14.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 14.3k]
  |  |  ------------------
  |  |  402|      4|      *nextTokPtr = ptr;                                                       \
  |  |  403|      4|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      4|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      4|    }                                                                          \
  |  |  405|  14.3k|    ptr += n;                                                                  \
  |  |  406|  14.3k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|      6|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 6, False: 33.7M]
  ------------------
  412|     11|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 5, False: 33.7M]
  ------------------
  413|     16|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 5, False: 33.7M]
  ------------------
  414|    847|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 831, False: 33.7M]
  ------------------
  415|  51.4k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 50.6k, False: 33.7M]
  ------------------
  416|  3.30M|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 3.24M, False: 30.5M]
  ------------------
  417|  3.30M|      *nextTokPtr = ptr;
  418|  3.30M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.30M|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  23.8M|    default:
  ------------------
  |  Branch (419:5): [True: 23.8M, False: 9.89M]
  ------------------
  420|  23.8M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  23.8M|#  define MINBPC(enc) 1
  ------------------
  421|  23.8M|      break;
  422|  33.7M|    }
  423|  33.7M|  }
  424|     95|  *nextTokPtr = ptr;
  425|     95|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|     95|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  3.30M|}
xmltok.c:normal_attributeValueTok:
 1262|  69.5M|                          const char **nextTokPtr) {
 1263|  69.5M|  const char *start;
 1264|  69.5M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 244k, False: 69.3M]
  ------------------
 1265|   244k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   244k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  69.3M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  69.3M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  69.3M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  69.3M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 69.3M]
  ------------------
 1267|       |    /* This line cannot be executed.  The incoming data has already
 1268|       |     * been tokenized once, so incomplete characters like this have
 1269|       |     * already been eliminated from the input.  Retaining the paranoia
 1270|       |     * check is still valuable, however.
 1271|       |     */
 1272|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1273|      0|  }
 1274|  69.3M|  start = ptr;
 1275|  1.02G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.02G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.02G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.02G|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|  1.02M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  1.02M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 1.02M, False: 1.02G]
  |  |  ------------------
  |  | 1279|  1.02M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  1.02M|    break;
  ------------------
 1282|   846M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   846M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 846M, False: 181M]
  |  |  ------------------
  |  | 1279|   846M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   846M|    break;
  ------------------
 1283|   460k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   460k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 460k, False: 1.02G]
  |  |  ------------------
  |  | 1279|   460k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   460k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   156k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 156k, False: 1.02G]
  ------------------
 1286|   156k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 118k, False: 37.6k]
  ------------------
 1287|   118k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   118k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   118k|#  define MINBPC(enc) 1
  ------------------
 1288|  37.6k|      *nextTokPtr = ptr;
 1289|  37.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  37.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      2|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 2, False: 1.02G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      2|      *nextTokPtr = ptr;
 1293|      2|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1294|  68.3M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 68.3M, False: 959M]
  ------------------
 1295|  68.3M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 66.5M, False: 1.85M]
  ------------------
 1296|  66.5M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  66.5M|#  define MINBPC(enc) 1
  ------------------
 1297|  66.5M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  66.5M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  66.5M|      }
 1299|  1.85M|      *nextTokPtr = ptr;
 1300|  1.85M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.85M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|   147k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 147k, False: 1.02G]
  ------------------
 1302|   147k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 129k, False: 18.0k]
  ------------------
 1303|   129k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   129k|#  define MINBPC(enc) 1
  ------------------
 1304|   129k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   129k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   129k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   129k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 880, False: 128k]
  ------------------
 1305|    880|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    880|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|   128k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   128k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   128k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 94.6k, False: 33.5k]
  ------------------
 1307|  94.6k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  94.6k|#  define MINBPC(enc) 1
  ------------------
 1308|   128k|        *nextTokPtr = ptr;
 1309|   128k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   128k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|   129k|      }
 1311|  18.0k|      *nextTokPtr = ptr;
 1312|  18.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  18.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|   431k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 431k, False: 1.02G]
  ------------------
 1314|   431k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 245k, False: 186k]
  ------------------
 1315|   245k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   245k|#  define MINBPC(enc) 1
  ------------------
 1316|   245k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|   245k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|   245k|      }
 1318|   186k|      *nextTokPtr = ptr;
 1319|   186k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   186k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   111M|    default:
  ------------------
  |  Branch (1320:5): [True: 111M, False: 917M]
  ------------------
 1321|   111M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   111M|#  define MINBPC(enc) 1
  ------------------
 1322|   111M|      break;
 1323|  1.02G|    }
 1324|  1.02G|  }
 1325|   219k|  *nextTokPtr = ptr;
 1326|   219k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   219k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  69.3M|}
xmltok.c:normal_entityValueTok:
 1331|   639k|                       const char **nextTokPtr) {
 1332|   639k|  const char *start;
 1333|   639k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.38k, False: 636k]
  ------------------
 1334|  2.38k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.38k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   636k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   636k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   636k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   636k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 636k]
  ------------------
 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|   636k|  start = ptr;
 1344|  13.8M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  13.8M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  13.8M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  13.8M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|  1.01k|      LEAD_CASE(2)
  ------------------
  |  | 1347|  1.01k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 1.01k, False: 13.8M]
  |  |  ------------------
  |  | 1348|  1.01k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  1.01k|    break;
  ------------------
 1351|    864|      LEAD_CASE(3)
  ------------------
  |  | 1347|    864|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 864, False: 13.8M]
  |  |  ------------------
  |  | 1348|    864|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    864|    break;
  ------------------
 1352|    738|      LEAD_CASE(4)
  ------------------
  |  | 1347|    738|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 738, False: 13.8M]
  |  |  ------------------
  |  | 1348|    738|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    738|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  16.3k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 16.3k, False: 13.8M]
  ------------------
 1355|  16.3k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 11.1k, False: 5.15k]
  ------------------
 1356|  11.1k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  11.1k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  11.1k|#  define MINBPC(enc) 1
  ------------------
 1357|  5.15k|      *nextTokPtr = ptr;
 1358|  5.15k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.15k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      9|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 9, False: 13.8M]
  ------------------
 1360|      9|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 6, False: 3]
  ------------------
 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|      2|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 2, False: 4]
  ------------------
 1363|      6|      }
 1364|      3|      *nextTokPtr = ptr;
 1365|      3|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      3|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  7.78k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 7.78k, False: 13.8M]
  ------------------
 1367|  7.78k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 5.48k, False: 2.29k]
  ------------------
 1368|  5.48k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.48k|#  define MINBPC(enc) 1
  ------------------
 1369|  5.48k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  5.48k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  5.48k|      }
 1371|  2.29k|      *nextTokPtr = ptr;
 1372|  2.29k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.29k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   611k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 611k, False: 13.2M]
  ------------------
 1374|   611k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 593k, False: 18.3k]
  ------------------
 1375|   593k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   593k|#  define MINBPC(enc) 1
  ------------------
 1376|   593k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   593k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   593k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   593k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 185, False: 593k]
  ------------------
 1377|    185|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    185|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   593k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   593k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   593k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 952, False: 592k]
  ------------------
 1379|    952|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    952|#  define MINBPC(enc) 1
  ------------------
 1380|   593k|        *nextTokPtr = ptr;
 1381|   593k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   593k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   593k|      }
 1383|  18.3k|      *nextTokPtr = ptr;
 1384|  18.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  18.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  13.2M|    default:
  ------------------
  |  Branch (1385:5): [True: 13.2M, False: 638k]
  ------------------
 1386|  13.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  13.2M|#  define MINBPC(enc) 1
  ------------------
 1387|  13.2M|      break;
 1388|  13.8M|    }
 1389|  13.8M|  }
 1390|    983|  *nextTokPtr = ptr;
 1391|    983|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    983|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   636k|}
xmltok.c:normal_nameMatchesAscii:
 1715|   118k|                         const char *end1, const char *ptr2) {
 1716|   118k|  UNUSED_P(enc);
  ------------------
  |  |  135|   118k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   687k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   569k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 605k, False: 82.4k]
  ------------------
 1718|   605k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   605k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 35, False: 605k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     35|      return 0; /* LCOV_EXCL_LINE */
 1725|     35|    }
 1726|   605k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   605k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 35.8k, False: 569k]
  ------------------
 1727|  35.8k|      return 0;
 1728|   605k|  }
 1729|  82.4k|  return ptr1 == end1;
 1730|   118k|}
xmltok.c:normal_nameLength:
 1733|  3.63M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  3.63M|  const char *start = ptr;
 1735|  8.15M|  for (;;) {
 1736|  8.15M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.15M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.15M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|  2.61k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  2.61k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 2.61k, False: 8.15M]
  |  |  ------------------
  |  | 1739|  2.61k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  2.61k|    break;
  ------------------
 1742|   768k|      LEAD_CASE(3)
  ------------------
  |  | 1738|   768k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 768k, False: 7.38M]
  |  |  ------------------
  |  | 1739|   768k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|   768k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 8.15M]
  |  |  ------------------
  |  | 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.15M]
  ------------------
 1746|  3.63M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 3.63M, False: 4.52M]
  ------------------
 1747|  3.63M|#  ifdef XML_NS
 1748|  3.63M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 8.15M]
  ------------------
 1749|  3.63M|#  endif
 1750|  3.71M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 82.9k, False: 8.07M]
  ------------------
 1751|  3.72M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 10.4k, False: 8.14M]
  ------------------
 1752|  3.72M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 656, False: 8.15M]
  ------------------
 1753|  3.74M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 20.5k, False: 8.13M]
  ------------------
 1754|  3.74M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.74M|#  define MINBPC(enc) 1
  ------------------
 1755|  3.74M|      break;
 1756|  3.63M|    default:
  ------------------
  |  Branch (1756:5): [True: 3.63M, False: 4.51M]
  ------------------
 1757|  3.63M|      return (int)(ptr - start);
 1758|  8.15M|    }
 1759|  8.15M|  }
 1760|  3.63M|}
xmltok.c:normal_getAtts:
 1510|  3.61M|                ATTRIBUTE *atts) {
 1511|  3.61M|  enum { other, inName, inValue } state = inName;
 1512|  3.61M|  int nAtts = 0;
 1513|  3.61M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  20.0M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.61M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  16.4M|#  define MINBPC(enc) 1
  ------------------
 1517|  20.0M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  20.0M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  20.0M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|   334k|      LEAD_CASE(2)
  ------------------
  |  | 1527|   334k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 334k, False: 19.6M]
  |  |  ------------------
  |  | 1528|   334k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   334k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 145k, False: 188k]
  |  |  |  |  ------------------
  |  |  |  | 1520|   145k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 73.1k, False: 72.5k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  73.1k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  73.1k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  73.1k|      }                                                                        \
  |  |  |  | 1524|   145k|      state = inName;                                                          \
  |  |  |  | 1525|   145k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|   334k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|   334k|    break;
  ------------------
 1531|  1.67M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  1.67M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 1.67M, False: 18.3M]
  |  |  ------------------
  |  | 1528|  1.67M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  1.67M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 12.2k, False: 1.66M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  12.2k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 6.30k, False: 5.89k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  6.30k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  6.30k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  6.30k|      }                                                                        \
  |  |  |  | 1524|  12.2k|      state = inName;                                                          \
  |  |  |  | 1525|  12.2k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  1.67M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  1.67M|    break;
  ------------------
 1532|    785|      LEAD_CASE(4)
  ------------------
  |  | 1527|    785|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 785, False: 20.0M]
  |  |  ------------------
  |  | 1528|    785|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|    785|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 785]
  |  |  |  |  ------------------
  |  |  |  | 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|    785|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|    785|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 20.0M]
  ------------------
 1535|  6.97M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 6.97M, False: 13.0M]
  ------------------
 1536|  7.33M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 357k, False: 19.6M]
  ------------------
 1537|  7.33M|      START_NAME
  ------------------
  |  | 1519|  7.33M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 1.15M, False: 6.17M]
  |  |  ------------------
  |  | 1520|  1.15M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 585k, False: 574k]
  |  |  ------------------
  |  | 1521|   585k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   585k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   585k|      }                                                                        \
  |  | 1524|  1.15M|      state = inName;                                                          \
  |  | 1525|  1.15M|    }
  ------------------
 1538|  7.33M|      break;
 1539|      0|#  undef START_NAME
 1540|   149k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 149k, False: 19.8M]
  ------------------
 1541|   149k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 60.7k, False: 89.1k]
  ------------------
 1542|  60.7k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 34.2k, False: 26.5k]
  ------------------
 1543|  34.2k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  34.2k|#  define MINBPC(enc) 1
  ------------------
 1544|  60.7k|        state = inValue;
 1545|  60.7k|        open = BT_QUOT;
 1546|  89.1k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 60.7k, False: 28.3k]
  ------------------
 1547|  60.7k|        state = other;
 1548|  60.7k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 34.2k, False: 26.5k]
  ------------------
 1549|  34.2k|          atts[nAtts].valueEnd = ptr;
 1550|  60.7k|        nAtts++;
 1551|  60.7k|      }
 1552|   149k|      break;
 1553|  2.53M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 2.53M, False: 17.4M]
  ------------------
 1554|  2.53M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 1.25M, False: 1.27M]
  ------------------
 1555|  1.25M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 630k, False: 626k]
  ------------------
 1556|   630k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   630k|#  define MINBPC(enc) 1
  ------------------
 1557|  1.25M|        state = inValue;
 1558|  1.25M|        open = BT_APOS;
 1559|  1.27M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 1.25M, False: 16.8k]
  ------------------
 1560|  1.25M|        state = other;
 1561|  1.25M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 630k, False: 626k]
  ------------------
 1562|   630k|          atts[nAtts].valueEnd = ptr;
 1563|  1.25M|        nAtts++;
 1564|  1.25M|      }
 1565|  2.53M|      break;
 1566|  18.1k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 18.1k, False: 20.0M]
  ------------------
 1567|  18.1k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 17.6k, False: 509]
  ------------------
 1568|  17.6k|        atts[nAtts].normalized = 0;
 1569|  18.1k|      break;
 1570|   449k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 449k, False: 19.5M]
  ------------------
 1571|   449k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 23.9k, False: 426k]
  ------------------
 1572|  23.9k|        state = other;
 1573|   426k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 376k, False: 49.2k]
  |  Branch (1573:36): [True: 191k, False: 185k]
  |  Branch (1573:55): [True: 10.4k, False: 180k]
  ------------------
 1574|   426k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 8.88k, False: 1.55k]
  ------------------
 1575|  10.4k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  1.55k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  11.9k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 449, False: 1.10k]
  ------------------
 1576|  10.4k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|  1.10k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  11.5k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 232, False: 877]
  ------------------
 1577|  10.4k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|    877|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|    877|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 509, False: 368]
  ------------------
 1578|  10.0k|        atts[nAtts].normalized = 0;
 1579|   449k|      break;
 1580|  1.59M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 1.59M, False: 18.4M]
  ------------------
 1581|  2.20M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 617k, False: 19.4M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  2.20M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 4.08k, False: 2.20M]
  ------------------
 1585|  4.08k|        state = other;
 1586|  2.20M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 748k, False: 1.45M]
  |  Branch (1586:36): [True: 497k, False: 250k]
  ------------------
 1587|   497k|        atts[nAtts].normalized = 0;
 1588|  2.20M|      break;
 1589|  3.62M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 3.62M, False: 16.4M]
  ------------------
 1590|  3.66M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 43.5k, False: 19.9M]
  ------------------
 1591|  3.66M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 3.61M, False: 57.9k]
  ------------------
 1592|  3.61M|        return nAtts;
 1593|  57.9k|      break;
 1594|  1.65M|    default:
  ------------------
  |  Branch (1594:5): [True: 1.65M, False: 18.3M]
  ------------------
 1595|  1.65M|      break;
 1596|  20.0M|    }
 1597|  20.0M|  }
 1598|       |  /* not reached */
 1599|  3.61M|}
xmltok.c:normal_charRefNumber:
 1602|  7.58k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  7.58k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  7.58k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.58k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  7.58k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  7.58k|#  define MINBPC(enc) 1
  ------------------
 1607|  7.58k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  7.58k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 5.77k, False: 1.80k]
  |  |  ------------------
  ------------------
 1608|  24.9k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  5.77k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|  24.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 19.1k, False: 5.74k]
  ------------------
 1609|  19.1k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  19.1k|#  define MINBPC(enc) 1
  ------------------
 1610|  19.1k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  19.1k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|  19.1k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 19.1k]
  ------------------
 1612|    610|      case ASCII_0:
  ------------------
  |  |   90|    610|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 610, False: 18.5k]
  ------------------
 1613|  1.72k|      case ASCII_1:
  ------------------
  |  |   91|  1.72k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 1.11k, False: 18.0k]
  ------------------
 1614|  2.50k|      case ASCII_2:
  ------------------
  |  |   92|  2.50k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 778, False: 18.4k]
  ------------------
 1615|  4.42k|      case ASCII_3:
  ------------------
  |  |   93|  4.42k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 1.92k, False: 17.2k]
  ------------------
 1616|  4.74k|      case ASCII_4:
  ------------------
  |  |   94|  4.74k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 321, False: 18.8k]
  ------------------
 1617|  5.78k|      case ASCII_5:
  ------------------
  |  |   95|  5.78k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 1.03k, False: 18.1k]
  ------------------
 1618|  9.03k|      case ASCII_6:
  ------------------
  |  |   96|  9.03k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 3.25k, False: 15.9k]
  ------------------
 1619|  9.54k|      case ASCII_7:
  ------------------
  |  |   97|  9.54k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 512, False: 18.6k]
  ------------------
 1620|  10.6k|      case ASCII_8:
  ------------------
  |  |   98|  10.6k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 1.13k, False: 18.0k]
  ------------------
 1621|  11.7k|      case ASCII_9:
  ------------------
  |  |   99|  11.7k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 1.06k, False: 18.1k]
  ------------------
 1622|  11.7k|        result <<= 4;
 1623|  11.7k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  11.7k|#define ASCII_0 0x30
  ------------------
 1624|  11.7k|        break;
 1625|    267|      case ASCII_A:
  ------------------
  |  |   36|    267|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 267, False: 18.9k]
  ------------------
 1626|    709|      case ASCII_B:
  ------------------
  |  |   37|    709|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 442, False: 18.7k]
  ------------------
 1627|  1.04k|      case ASCII_C:
  ------------------
  |  |   38|  1.04k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 336, False: 18.8k]
  ------------------
 1628|  1.28k|      case ASCII_D:
  ------------------
  |  |   39|  1.28k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 244, False: 18.9k]
  ------------------
 1629|  1.91k|      case ASCII_E:
  ------------------
  |  |   40|  1.91k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 626, False: 18.5k]
  ------------------
 1630|  3.08k|      case ASCII_F:
  ------------------
  |  |   41|  3.08k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.17k, False: 18.0k]
  ------------------
 1631|  3.08k|        result <<= 4;
 1632|  3.08k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.08k|#define ASCII_A 0x41
  ------------------
 1633|  3.08k|        break;
 1634|    734|      case ASCII_a:
  ------------------
  |  |   63|    734|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 734, False: 18.4k]
  ------------------
 1635|  1.88k|      case ASCII_b:
  ------------------
  |  |   64|  1.88k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 1.15k, False: 18.0k]
  ------------------
 1636|  2.66k|      case ASCII_c:
  ------------------
  |  |   65|  2.66k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 772, False: 18.4k]
  ------------------
 1637|  3.19k|      case ASCII_d:
  ------------------
  |  |   66|  3.19k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 537, False: 18.6k]
  ------------------
 1638|  3.78k|      case ASCII_e:
  ------------------
  |  |   67|  3.78k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 587, False: 18.6k]
  ------------------
 1639|  4.36k|      case ASCII_f:
  ------------------
  |  |   68|  4.36k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 584, False: 18.6k]
  ------------------
 1640|  4.36k|        result <<= 4;
 1641|  4.36k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  4.36k|#define ASCII_a 0x61
  ------------------
 1642|  4.36k|        break;
 1643|  19.1k|      }
 1644|  19.1k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 32, False: 19.1k]
  ------------------
 1645|     32|        return -1;
 1646|  19.1k|    }
 1647|  5.77k|  } else {
 1648|  7.03k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  7.03k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  5.22k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 5.23k, False: 1.79k]
  ------------------
 1649|  5.23k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  5.23k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  5.23k|      result *= 10;
 1651|  5.23k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  5.23k|#define ASCII_0 0x30
  ------------------
 1652|  5.23k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 10, False: 5.22k]
  ------------------
 1653|     10|        return -1;
 1654|  5.23k|    }
 1655|  1.80k|  }
 1656|  7.54k|  return checkCharRefNumber(result);
 1657|  7.58k|}
xmltok.c:normal_predefinedEntityName:
 1661|   209k|                             const char *end) {
 1662|   209k|  UNUSED_P(enc);
  ------------------
  |  |  135|   209k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|   209k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|   209k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 194k, False: 15.1k]
  ------------------
 1664|  6.46k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 6.46k, False: 203k]
  ------------------
 1665|  6.46k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  6.46k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 5.77k, False: 691]
  |  |  ------------------
  ------------------
 1666|  5.77k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  5.77k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 7, False: 5.77k]
  |  |  ------------------
  ------------------
 1667|  5.40k|      case ASCII_l:
  ------------------
  |  |   74|  5.40k|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 5.40k, False: 377]
  ------------------
 1668|  5.40k|        return ASCII_LT;
  ------------------
  |  |  111|  5.40k|#define ASCII_LT 0x3C
  ------------------
 1669|    370|      case ASCII_g:
  ------------------
  |  |   69|    370|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 370, False: 5.40k]
  ------------------
 1670|    370|        return ASCII_GT;
  ------------------
  |  |  113|    370|#define ASCII_GT 0x3E
  ------------------
 1671|  5.77k|      }
 1672|  5.77k|    }
 1673|    698|    break;
 1674|  1.00k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.00k, False: 208k]
  ------------------
 1675|  1.00k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.00k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 662, False: 341]
  |  |  ------------------
  ------------------
 1676|    662|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    662|#  define MINBPC(enc) 1
  ------------------
 1677|    662|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    662|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 406, False: 256]
  |  |  ------------------
  ------------------
 1678|    406|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    406|#  define MINBPC(enc) 1
  ------------------
 1679|    406|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    406|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 337, False: 69]
  |  |  ------------------
  ------------------
 1680|    337|          return ASCII_AMP;
  ------------------
  |  |  105|    337|#define ASCII_AMP 0x26
  ------------------
 1681|    406|      }
 1682|    662|    }
 1683|    666|    break;
 1684|  7.67k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 7.67k, False: 201k]
  ------------------
 1685|  7.67k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  7.67k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 262, False: 7.41k]
  |  |  ------------------
  ------------------
 1686|  6.69k|    case ASCII_q:
  ------------------
  |  |   79|  6.69k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 6.69k, False: 978]
  ------------------
 1687|  6.69k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.69k|#  define MINBPC(enc) 1
  ------------------
 1688|  6.69k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|  6.69k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.48k, False: 205]
  |  |  ------------------
  ------------------
 1689|  6.48k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.48k|#  define MINBPC(enc) 1
  ------------------
 1690|  6.48k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|  6.48k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.24k, False: 248]
  |  |  ------------------
  ------------------
 1691|  6.24k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.24k|#  define MINBPC(enc) 1
  ------------------
 1692|  6.24k|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|  6.24k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 5.57k, False: 665]
  |  |  ------------------
  ------------------
 1693|  5.57k|            return ASCII_QUOT;
  ------------------
  |  |  104|  5.57k|#define ASCII_QUOT 0x22
  ------------------
 1694|  6.24k|        }
 1695|  6.48k|      }
 1696|  1.11k|      break;
 1697|  1.11k|    case ASCII_a:
  ------------------
  |  |   63|    716|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 716, False: 6.95k]
  ------------------
 1698|    716|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    716|#  define MINBPC(enc) 1
  ------------------
 1699|    716|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|    716|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 482, False: 234]
  |  |  ------------------
  ------------------
 1700|    482|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    482|#  define MINBPC(enc) 1
  ------------------
 1701|    482|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    482|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 280, False: 202]
  |  |  ------------------
  ------------------
 1702|    280|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    280|#  define MINBPC(enc) 1
  ------------------
 1703|    280|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|    280|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 210, False: 70]
  |  |  ------------------
  ------------------
 1704|    210|            return ASCII_APOS;
  ------------------
  |  |  106|    210|#define ASCII_APOS 0x27
  ------------------
 1705|    280|        }
 1706|    482|      }
 1707|    506|      break;
 1708|  7.67k|    }
 1709|   209k|  }
 1710|   197k|  return 0;
 1711|   209k|}
xmltok.c:normal_updatePosition:
 1779|  3.24k|                       POSITION *pos) {
 1780|   647k|  while (HAS_CHAR(enc, ptr, end)) {
 1781|   647k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   647k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   647k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|  1.30k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  1.30k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.30k, False: 646k]
  |  |  ------------------
  |  | 1784|  1.30k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.30k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.30k|    break;
  ------------------
 1788|  4.03k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  4.03k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 4.03k, False: 643k]
  |  |  ------------------
  |  | 1784|  4.03k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  4.03k|    pos->columnNumber++;                                                       \
  |  | 1786|  4.03k|    break;
  ------------------
 1789|    535|      LEAD_CASE(4)
  ------------------
  |  | 1783|    535|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 535, False: 647k]
  |  |  ------------------
  |  | 1784|    535|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|    535|    pos->columnNumber++;                                                       \
  |  | 1786|    535|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  29.7k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 29.7k, False: 618k]
  ------------------
 1792|  29.7k|      pos->columnNumber = 0;
 1793|  29.7k|      pos->lineNumber++;
 1794|  29.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  29.7k|#  define MINBPC(enc) 1
  ------------------
 1795|  29.7k|      break;
 1796|   138k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 138k, False: 509k]
  ------------------
 1797|   138k|      pos->lineNumber++;
 1798|   138k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   138k|#  define MINBPC(enc) 1
  ------------------
 1799|   138k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|   138k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   277k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   138k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 138k, False: 43]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   138k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   138k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 90.7k, False: 47.9k]
  ------------------
 1800|  90.7k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  90.7k|#  define MINBPC(enc) 1
  ------------------
 1801|   138k|      pos->columnNumber = 0;
 1802|   138k|      break;
 1803|   473k|    default:
  ------------------
  |  Branch (1803:5): [True: 473k, False: 174k]
  ------------------
 1804|   473k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   473k|#  define MINBPC(enc) 1
  ------------------
 1805|   473k|      pos->columnNumber++;
 1806|   473k|      break;
 1807|   647k|    }
 1808|   647k|  }
 1809|  3.24k|}
xmltok.c:normal_isPublicId:
 1450|  1.81k|                   const char **badPtr) {
 1451|  1.81k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.81k|#  define MINBPC(enc) 1
  ------------------
 1452|  1.81k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  1.81k|#  define MINBPC(enc) 1
  ------------------
 1453|  22.0k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  22.0k|#  define MINBPC(enc) 1
  ------------------
 1454|  22.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  22.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  22.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|  1.29k|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 1.29k, False: 20.7k]
  ------------------
 1456|  5.63k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 4.34k, False: 17.6k]
  ------------------
 1457|  6.21k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 580, False: 21.4k]
  ------------------
 1458|  6.48k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 272, False: 21.7k]
  ------------------
 1459|  11.2k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 4.77k, False: 17.2k]
  ------------------
 1460|  11.5k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 277, False: 21.7k]
  ------------------
 1461|  11.8k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 275, False: 21.7k]
  ------------------
 1462|  12.0k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 199, False: 21.8k]
  ------------------
 1463|  12.3k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 325, False: 21.6k]
  ------------------
 1464|  13.5k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 1.25k, False: 20.7k]
  ------------------
 1465|  13.7k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 206, False: 21.8k]
  ------------------
 1466|  14.1k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 328, False: 21.6k]
  ------------------
 1467|  14.8k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 708, False: 21.3k]
  ------------------
 1468|  15.0k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 222, False: 21.7k]
  ------------------
 1469|  16.4k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 1.39k, False: 20.6k]
  ------------------
 1470|  16.6k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 227, False: 21.7k]
  ------------------
 1471|  16.8k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 215, False: 21.8k]
  ------------------
 1472|  17.2k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 371, False: 21.6k]
  ------------------
 1473|  17.2k|#  ifdef XML_NS
 1474|  17.2k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 22.0k]
  ------------------
 1475|  17.2k|#  endif
 1476|  17.2k|      break;
 1477|    353|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 353, False: 21.6k]
  ------------------
 1478|    353|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    353|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 352]
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    352|      break;
 1483|    352|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 230, False: 21.7k]
  ------------------
 1484|  3.72k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 3.49k, False: 18.5k]
  ------------------
 1485|  3.72k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  3.72k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 3.72k, False: 0]
  ------------------
 1486|  3.72k|        break;
 1487|       |      /* fall through */
 1488|    671|    default:
  ------------------
  |  Branch (1488:5): [True: 671, False: 21.3k]
  ------------------
 1489|    671|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    671|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    241|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 241, False: 430]
  ------------------
 1491|    658|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 417, False: 254]
  ------------------
 1492|    658|        break;
 1493|     13|      default:
  ------------------
  |  Branch (1493:7): [True: 13, False: 658]
  ------------------
 1494|     13|        *badPtr = ptr;
 1495|     13|        return 0;
 1496|    671|      }
 1497|    658|      break;
 1498|  22.0k|    }
 1499|  22.0k|  }
 1500|  1.80k|  return 1;
 1501|  1.81k|}
xmltok.c:little2_prologTok:
 1018|  80.1k|                  const char **nextTokPtr) {
 1019|  80.1k|  int tok;
 1020|  80.1k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 186, False: 80.0k]
  ------------------
 1021|    186|    return XML_TOK_NONE;
  ------------------
  |  |   51|    186|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  80.0k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  80.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  80.0k|    size_t n = end - ptr;
 1024|  80.0k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  80.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 36.1k, False: 43.8k]
  ------------------
 1025|  36.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  36.1k|#  define MINBPC(enc) 2
  ------------------
 1026|  36.1k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 36, False: 36.1k]
  ------------------
 1027|     36|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  36.1k|      end = ptr + n;
 1029|  36.1k|    }
 1030|  80.0k|  }
 1031|  79.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  79.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  79.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  78.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 78.2k, False: 1.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.38k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.38k, False: 78.5k]
  ------------------
 1033|  1.38k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.38k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.38k|#  define MINBPC(enc) 2
  ------------------
 1034|  4.48k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.48k, False: 75.4k]
  ------------------
 1035|  4.48k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.48k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.48k|#  define MINBPC(enc) 2
  ------------------
 1036|  12.1k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 12.1k, False: 67.8k]
  ------------------
 1037|  12.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.1k|#  define MINBPC(enc) 2
  ------------------
 1038|  12.1k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.1k|    {                                                                          \
  |  |  |  |  135|  12.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  12.1k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 12.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  12.1k|    }
  |  |  ------------------
  ------------------
 1039|  12.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  12.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  12.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 9, False: 12.1k]
  |  |  |  |  |  Branch (737:4): [True: 10.9k, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  6.21k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 6.21k, False: 5.93k]
  ------------------
 1041|  6.21k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  6.21k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  6.21k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.64k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.64k, False: 9.50k]
  ------------------
 1043|  2.64k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.64k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.64k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.07k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.07k, False: 11.0k]
  ------------------
 1045|  2.05k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 983, False: 11.1k]
  ------------------
 1046|  3.25k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.19k, False: 10.9k]
  ------------------
 1047|  3.25k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 12.1k]
  ------------------
 1048|  3.25k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 12.1k]
  ------------------
 1049|  3.27k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 23, False: 12.1k]
  ------------------
 1050|  3.27k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.27k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.27k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.27k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  12.1k|    }
 1053|      9|    *nextTokPtr = ptr;
 1054|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
 1055|  12.1k|  }
 1056|  3.16k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 3.16k, False: 76.8k]
  ------------------
 1057|  3.16k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  3.16k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 37, False: 3.12k]
  ------------------
 1058|     37|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     37|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     37|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     37|    }
 1062|       |    /* fall through */
 1063|  19.0k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 15.8k, False: 64.0k]
  ------------------
 1064|  24.8k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 5.78k, False: 74.1k]
  ------------------
 1065|  26.5k|    for (;;) {
 1066|  26.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  26.5k|#  define MINBPC(enc) 2
  ------------------
 1067|  26.5k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  26.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  26.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  26.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 130, False: 26.3k]
  ------------------
 1068|    130|        break;
 1069|  26.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  26.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  26.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  25.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 25.2k, False: 1.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|    816|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 816, False: 25.5k]
  ------------------
 1071|  1.28k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 467, False: 25.9k]
  ------------------
 1072|  1.28k|        break;
 1073|    423|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 423, False: 25.9k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    423|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    423|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 420, False: 3]
  ------------------
 1076|    420|          break;
 1077|       |        /* fall through */
 1078|  24.6k|      default:
  ------------------
  |  Branch (1078:7): [True: 24.6k, False: 1.70k]
  ------------------
 1079|  24.6k|        *nextTokPtr = ptr;
 1080|  24.6k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  24.6k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  26.3k|      }
 1082|  26.3k|    }
 1083|    130|    *nextTokPtr = ptr;
 1084|    130|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    130|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  1.26k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 1.26k, False: 78.7k]
  ------------------
 1086|  1.26k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.26k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.26k|#  define MINBPC(enc) 2
  ------------------
 1087|  1.12k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.12k, False: 78.8k]
  ------------------
 1088|  1.12k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.12k|#  define MINBPC(enc) 2
  ------------------
 1089|  1.12k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.12k|#define XML_TOK_COMMA 38
  ------------------
 1090|    982|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 982, False: 78.9k]
  ------------------
 1091|    982|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    982|#  define MINBPC(enc) 2
  ------------------
 1092|    982|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|    982|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    536|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 536, False: 79.4k]
  ------------------
 1094|    536|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    536|#  define MINBPC(enc) 2
  ------------------
 1095|    536|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    536|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    536|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    536|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 534]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    534|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    534|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    534|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 523, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 36, False: 487]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     36|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     36|    {                                                                          \
  |  |  135|     36|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     36|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     36|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 35]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     36|    }
  ------------------
 1099|     35|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     35|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     35|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 21, False: 14]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      2|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      2|#  define MINBPC(enc) 2
  ------------------
 1101|      2|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      2|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      2|      }
 1103|     35|    }
 1104|    531|    *nextTokPtr = ptr;
 1105|    531|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    531|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  5.01k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 5.01k, False: 74.9k]
  ------------------
 1107|  5.01k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.01k|#  define MINBPC(enc) 2
  ------------------
 1108|  5.01k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  5.01k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.66k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.66k, False: 76.3k]
  ------------------
 1110|  3.66k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.66k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.66k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.66k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.66k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.66k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 7, False: 3.65k]
  ------------------
 1112|      7|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      7|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.65k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.65k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.65k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 29, False: 3.62k]
  |  |  |  |  |  Branch (737:4): [True: 3.63k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    201|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 201, False: 3.45k]
  ------------------
 1115|    201|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    201|#  define MINBPC(enc) 2
  ------------------
 1116|    201|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    201|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    135|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 135, False: 3.52k]
  ------------------
 1118|    135|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    135|#  define MINBPC(enc) 2
  ------------------
 1119|    135|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    135|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    232|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 232, False: 3.42k]
  ------------------
 1121|    232|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    232|#  define MINBPC(enc) 2
  ------------------
 1122|    232|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    232|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    437|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 437, False: 3.21k]
  ------------------
 1124|    527|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 90, False: 3.56k]
  ------------------
 1125|    882|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 355, False: 3.30k]
  ------------------
 1126|  1.70k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 822, False: 2.83k]
  ------------------
 1127|  2.11k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 407, False: 3.24k]
  ------------------
 1128|  2.35k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 240, False: 3.41k]
  ------------------
 1129|  3.05k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 708, False: 2.94k]
  ------------------
 1130|  3.05k|      *nextTokPtr = ptr;
 1131|  3.05k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.05k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.65k|    }
 1133|     29|    *nextTokPtr = ptr;
 1134|     29|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
 1135|  1.72k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 1.72k, False: 78.2k]
  ------------------
 1136|  1.72k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.72k|#  define MINBPC(enc) 2
  ------------------
 1137|  1.72k|    return XML_TOK_OR;
  ------------------
  |  |   88|  1.72k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  4.08k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 4.08k, False: 75.8k]
  ------------------
 1139|  4.08k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.08k|#  define MINBPC(enc) 2
  ------------------
 1140|  4.08k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  4.08k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  1.63k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 1.63k, False: 78.3k]
  ------------------
 1142|  1.63k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.63k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.63k|#  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: 79.9k]
  |  |  ------------------
  |  | 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: 79.9k]
  |  |  ------------------
  |  | 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|     84|    LEAD_CASE(4)
  ------------------
  |  | 1144|     17|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 33, False: 79.9k]
  |  |  ------------------
  |  | 1145|     33|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 16, False: 17]
  |  |  ------------------
  |  | 1146|     17|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     16|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     17|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     17|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|     17|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     17|#  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|     17|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     17|#  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|     17|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  10.3k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 10.3k, False: 69.6k]
  ------------------
 1168|  14.7k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 4.43k, False: 75.5k]
  ------------------
 1169|  14.7k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  14.7k|#define XML_TOK_NAME 18
  ------------------
 1170|  14.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  14.7k|#  define MINBPC(enc) 2
  ------------------
 1171|  14.7k|    break;
 1172|     33|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 33, False: 79.9k]
  ------------------
 1173|    240|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 207, False: 79.7k]
  ------------------
 1174|    645|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 405, False: 79.5k]
  ------------------
 1175|    645|#  ifdef XML_NS
 1176|    645|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 79.9k]
  ------------------
 1177|    645|#  endif
 1178|    645|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    645|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    645|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    645|#  define MINBPC(enc) 2
  ------------------
 1180|    645|    break;
 1181|  1.64k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 1.64k, False: 78.3k]
  ------------------
 1182|  1.64k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  1.64k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  1.64k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  1.64k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.43k, False: 211]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.43k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.43k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.43k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.43k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.43k|      break;
 1186|  1.43k|    }
 1187|    211|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    211|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    211|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    211|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 102, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    102|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    102|#  define MINBPC(enc) 2
  ------------------
 1189|    102|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    102|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    102|      break;
 1191|    102|    }
 1192|       |    /* fall through */
 1193|    140|  default:
  ------------------
  |  Branch (1193:3): [True: 31, False: 79.9k]
  ------------------
 1194|    140|    *nextTokPtr = ptr;
 1195|    140|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    140|#define XML_TOK_INVALID 0
  ------------------
 1196|  79.9k|  }
 1197|  31.3k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  31.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  31.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  31.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 30.5k, False: 837]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  49.4k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  14.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 810, False: 30.5k]
  |  |  ------------------
  |  |   82|  14.5k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    810|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    810|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    810|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 58, False: 752]
  |  |  ------------------
  |  |   83|     58|      *nextTokPtr = ptr;                                                       \
  |  |   84|     58|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     58|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     58|    }                                                                          \
  |  |   86|  14.5k|    /* fall through */                                                         \
  |  |   87|  14.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 6.10k, False: 25.2k]
  |  |  ------------------
  |  |   88|  13.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.49k, False: 24.8k]
  |  |  ------------------
  |  |   89|  14.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 760, False: 30.6k]
  |  |  ------------------
  |  |   90|  14.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 217, False: 31.1k]
  |  |  ------------------
  |  |   91|  14.5k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 269, False: 31.0k]
  |  |  ------------------
  |  |   92|  14.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  14.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  14.5k|    break;                                                                     \
  |  |   94|  14.5k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 31.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 31.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 31.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|     21|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 21, False: 31.3k]
  ------------------
 1201|  1.64k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.62k, False: 29.7k]
  ------------------
 1202|  1.77k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 124, False: 31.2k]
  ------------------
 1203|  2.57k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 798, False: 30.5k]
  ------------------
 1204|  3.22k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 656, False: 30.7k]
  ------------------
 1205|  3.22k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 1, False: 31.3k]
  ------------------
 1206|  11.6k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 8.43k, False: 22.9k]
  ------------------
 1207|  12.6k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.02k, False: 30.3k]
  ------------------
 1208|  15.3k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.63k, False: 28.7k]
  ------------------
 1209|  15.3k|      *nextTokPtr = ptr;
 1210|  15.3k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 31.3k]
  ------------------
 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|    449|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 449, False: 30.9k]
  ------------------
 1232|    449|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    449|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 448]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    448|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    448|#  define MINBPC(enc) 2
  ------------------
 1237|    448|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    448|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    761|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 761, False: 30.6k]
  ------------------
 1239|    761|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    761|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 760]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    760|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    760|#  define MINBPC(enc) 2
  ------------------
 1244|    760|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    760|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    140|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 140, False: 31.2k]
  ------------------
 1246|    140|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    140|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 139]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    139|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    139|#  define MINBPC(enc) 2
  ------------------
 1251|    139|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    139|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     17|    default:
  ------------------
  |  Branch (1252:5): [True: 17, False: 31.3k]
  ------------------
 1253|     17|      *nextTokPtr = ptr;
 1254|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
 1255|  31.3k|    }
 1256|  31.3k|  }
 1257|    165|  return -tok;
 1258|  16.9k|}
xmltok.c:little2_scanLit:
  984|  5.86k|                const char **nextTokPtr) {
  985|  14.8M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  14.8M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  14.8M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  14.8M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   218k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 218k, False: 14.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  14.8M|    switch (t) {
  988|   211k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 14.8M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 14.8M]
  |  |  |  |  ------------------
  |  |  |  |   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|   105k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   105k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 105k, False: 14.7M]
  |  |  |  |  ------------------
  |  |  |  |   50|   105k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 19, False: 105k]
  |  |  |  |  ------------------
  |  |  |  |   51|   105k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     19|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   105k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   105k|#    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|   105k|    ptr += n;                                                                  \
  |  |  |  |   57|   105k|    break;
  |  |  ------------------
  |  |   63|   105k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 18, False: 14.8M]
  |  |  ------------------
  |  |   64|     18|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 14.8M]
  |  |  ------------------
  |  |   65|     24|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 14.8M]
  |  |  ------------------
  |  |   66|     24|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     24|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  4.21k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 4.21k, False: 14.8M]
  ------------------
  990|  9.11k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 4.90k, False: 14.8M]
  ------------------
  991|  9.11k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.11k|#  define MINBPC(enc) 2
  ------------------
  992|  9.11k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 3.35k, False: 5.75k]
  ------------------
  993|  3.35k|        break;
  994|  5.75k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.75k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.75k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.75k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 8, False: 5.74k]
  ------------------
  995|      8|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      8|#define XML_TOK_LITERAL 27
  ------------------
  996|  5.74k|      *nextTokPtr = ptr;
  997|  5.74k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.74k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.74k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.71k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.71k, False: 36]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  2.18k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 2.18k, False: 3.56k]
  ------------------
  999|  2.37k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 189, False: 5.56k]
  ------------------
 1000|  3.20k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 829, False: 4.92k]
  ------------------
 1001|  5.69k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.49k, False: 3.25k]
  ------------------
 1002|  5.70k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 3, False: 5.74k]
  ------------------
 1003|  5.70k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 7, False: 5.74k]
  ------------------
 1004|  5.70k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  5.70k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     42|      default:
  ------------------
  |  Branch (1005:7): [True: 42, False: 5.70k]
  ------------------
 1006|     42|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
 1007|  5.74k|      }
 1008|  14.7M|    default:
  ------------------
  |  Branch (1008:5): [True: 14.7M, False: 115k]
  ------------------
 1009|  14.7M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  14.7M|#  define MINBPC(enc) 2
  ------------------
 1010|  14.7M|      break;
 1011|  14.8M|    }
 1012|  14.8M|  }
 1013|     64|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  5.86k|}
xmltok.c:little2_scanDecl:
  183|  6.21k|                 const char **nextTokPtr) {
  184|  6.21k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.21k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.21k|    {                                                                          \
  |  |  |  |  135|  6.21k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.21k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.21k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 6.21k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  6.21k|    }
  |  |  ------------------
  ------------------
  185|  6.21k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.21k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.21k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.19k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.19k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    928|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 928, False: 5.28k]
  ------------------
  187|    928|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    928|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    928|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 6.21k]
  ------------------
  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|     84|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 84, False: 6.13k]
  ------------------
  192|  5.25k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 5.17k, False: 1.04k]
  ------------------
  193|  5.25k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.25k|#  define MINBPC(enc) 2
  ------------------
  194|  5.25k|    break;
  195|     27|  default:
  ------------------
  |  Branch (195:3): [True: 27, False: 6.18k]
  ------------------
  196|     27|    *nextTokPtr = ptr;
  197|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  198|  6.21k|  }
  199|  34.6k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  34.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  34.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  34.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  34.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 34.6k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     42|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 42, False: 34.6k]
  ------------------
  202|     42|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     42|    {                                                                          \
  |  |  135|     42|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     42|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     42|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 41]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     42|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     41|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     41|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     41|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|     14|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 36, False: 5]
  |  |  |  |  |  Branch (737:4): [True: 14, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      2|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 2, False: 39]
  ------------------
  206|      3|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 40]
  ------------------
  207|      4|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 40]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 40]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|     41|      }
  212|       |      /* fall through */
  213|  4.07k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.03k, False: 30.6k]
  ------------------
  214|  4.42k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 349, False: 34.3k]
  ------------------
  215|  5.20k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 778, False: 33.9k]
  ------------------
  216|  5.20k|      *nextTokPtr = ptr;
  217|  5.20k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  5.20k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  24.4k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 24.4k, False: 10.2k]
  ------------------
  219|  29.4k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 5.01k, False: 29.6k]
  ------------------
  220|  29.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  29.4k|#  define MINBPC(enc) 2
  ------------------
  221|  29.4k|      break;
  222|     30|    default:
  ------------------
  |  Branch (222:5): [True: 30, False: 34.6k]
  ------------------
  223|     30|      *nextTokPtr = ptr;
  224|     30|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  225|  34.6k|    }
  226|  34.6k|  }
  227|     23|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  5.25k|}
xmltok.c:little2_scanComment:
  146|  1.16k|                    const char **nextTokPtr) {
  147|  1.16k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.16k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.16k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.16k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.15k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.15k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|  1.15k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.15k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.15k, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 1.13k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     20|      *nextTokPtr = ptr;
  150|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  151|     20|    }
  152|  1.13k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.13k|#  define MINBPC(enc) 2
  ------------------
  153|   350k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   350k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   350k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   350k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  20.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 20.4k, False: 330k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  30.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: 350k]
  |  |  |  |  ------------------
  |  |  |  |   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: 350k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  15.3k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  15.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 15.3k, False: 335k]
  |  |  |  |  ------------------
  |  |  |  |   50|  15.3k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 15.3k]
  |  |  |  |  ------------------
  |  |  |  |   51|  15.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  15.3k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  15.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|  15.3k|    ptr += n;                                                                  \
  |  |  |  |   57|  15.3k|    break;
  |  |  ------------------
  |  |   63|  15.3k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 33, False: 350k]
  |  |  ------------------
  |  |   64|     33|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 350k]
  |  |  ------------------
  |  |   65|     42|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 350k]
  |  |  ------------------
  |  |   66|     42|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     42|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     42|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.76k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.76k, False: 348k]
  ------------------
  157|  1.76k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.76k|#  define MINBPC(enc) 2
  ------------------
  158|  1.76k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.76k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.76k|    {                                                                          \
  |  |  |  |  135|  1.76k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.76k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.76k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.76k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.76k|    }
  |  |  ------------------
  ------------------
  159|  1.76k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|  1.76k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.76k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.36k, False: 396]
  |  |  |  |  |  Branch (739:52): [True: 1.00k, False: 364]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|  1.00k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.00k|#  define MINBPC(enc) 2
  ------------------
  161|  1.00k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.00k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.00k|    {                                                                          \
  |  |  |  |  135|  1.00k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.00k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.00k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.00k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.00k|    }
  |  |  ------------------
  ------------------
  162|  1.00k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  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: 996, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 987, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     16|            *nextTokPtr = ptr;
  164|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  165|     16|          }
  166|    987|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    987|#  define MINBPC(enc) 2
  ------------------
  167|    987|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    987|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.00k|        }
  169|    760|        break;
  170|   333k|      default:
  ------------------
  |  Branch (170:7): [True: 333k, False: 17.1k]
  ------------------
  171|   333k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   333k|#  define MINBPC(enc) 2
  ------------------
  172|   333k|        break;
  173|   350k|      }
  174|   350k|    }
  175|  1.13k|  }
  176|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.16k|}
xmltok.c:little2_scanPi:
  277|  8.38k|               const char **nextTokPtr) {
  278|  8.38k|  int tok;
  279|  8.38k|  const char *target = ptr;
  280|  8.38k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.38k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.38k|    {                                                                          \
  |  |  |  |  135|  8.38k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.38k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  8.38k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 8.37k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  8.38k|    }
  |  |  ------------------
  ------------------
  281|  8.37k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  8.37k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  8.37k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.99k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.99k, False: 1.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  8.73k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  8.33k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.35k, False: 7.02k]
  |  |  ------------------
  |  |  111|  8.33k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.35k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.35k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.35k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 1.34k]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  8.33k|    /* fall through */                                                         \
  |  |  116|  8.33k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.99k, False: 2.38k]
  |  |  ------------------
  |  |  117|  8.33k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 994, False: 7.38k]
  |  |  ------------------
  |  |  118|  8.33k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  8.33k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  8.33k|    break;                                                                     \
  |  |  120|  8.33k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 8.37k]
  |  |  |  |  ------------------
  |  |  |  |  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: 8.37k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     24|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 24, False: 8.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|     24|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      8|  default:
  ------------------
  |  Branch (283:3): [True: 8, False: 8.36k]
  ------------------
  284|      8|    *nextTokPtr = ptr;
  285|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  286|  8.37k|  }
  287|  27.6k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  27.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  27.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  27.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 21.5k, False: 6.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  75.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  19.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 6.07k, False: 21.5k]
  |  |  ------------------
  |  |   82|  19.3k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  6.07k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  6.07k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  6.07k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 22, False: 6.05k]
  |  |  ------------------
  |  |   83|     22|      *nextTokPtr = ptr;                                                       \
  |  |   84|     22|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     22|    }                                                                          \
  |  |   86|  19.3k|    /* fall through */                                                         \
  |  |   87|  19.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 7.65k, False: 19.9k]
  |  |  ------------------
  |  |   88|  17.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.03k, False: 23.6k]
  |  |  ------------------
  |  |   89|  18.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.01k, False: 26.6k]
  |  |  ------------------
  |  |   90|  18.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 222, False: 27.4k]
  |  |  ------------------
  |  |   91|  19.3k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 395, False: 27.2k]
  |  |  ------------------
  |  |   92|  19.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  19.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  19.3k|    break;                                                                     \
  |  |   94|  19.3k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 27.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: 27.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 27.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  2.06k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 2.06k, False: 25.5k]
  ------------------
  291|  2.73k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 665, False: 26.9k]
  ------------------
  292|  3.03k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 304, False: 27.3k]
  ------------------
  293|  3.03k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  3.03k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 3.03k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  3.03k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.03k|#  define MINBPC(enc) 2
  ------------------
  298|   273k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   273k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   273k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   273k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  33.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 33.0k, False: 240k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  10.6k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 273k]
  |  |  |  |  ------------------
  |  |  |  |   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: 273k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  5.31k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.29k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.31k, False: 268k]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.31k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 21, False: 5.29k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.29k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     21|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.29k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  5.29k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  5.29k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.29k|    break;
  |  |  ------------------
  |  |   63|  5.29k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 20, False: 273k]
  |  |  ------------------
  |  |   64|     20|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 273k]
  |  |  ------------------
  |  |   65|     26|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 273k]
  |  |  ------------------
  |  |   66|     26|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     26|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  5.04k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 5.04k, False: 268k]
  ------------------
  302|  5.04k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.04k|#  define MINBPC(enc) 2
  ------------------
  303|  5.04k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.04k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.04k|    {                                                                          \
  |  |  |  |  135|  5.04k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.04k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.04k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 5.04k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  5.04k|    }
  |  |  ------------------
  ------------------
  304|  5.04k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  5.04k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.04k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.26k, False: 773]
  |  |  |  |  |  Branch (739:52): [True: 2.86k, False: 1.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.86k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.86k|#  define MINBPC(enc) 2
  ------------------
  306|  2.86k|            return tok;
  307|  2.86k|          }
  308|  2.17k|          break;
  309|   263k|        default:
  ------------------
  |  Branch (309:9): [True: 263k, False: 10.3k]
  ------------------
  310|   263k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   263k|#  define MINBPC(enc) 2
  ------------------
  311|   263k|          break;
  312|   273k|        }
  313|   273k|      }
  314|    113|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    113|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  5.17k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 5.17k, False: 22.4k]
  ------------------
  316|  5.17k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  5.17k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 5.17k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  5.17k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.17k|#  define MINBPC(enc) 2
  ------------------
  321|  5.17k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.17k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.17k|    {                                                                          \
  |  |  |  |  135|  5.17k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.17k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.17k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 23, False: 5.15k]
  |  |  |  |  ------------------
  |  |  |  |  136|     23|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     23|      }                                                                        \
  |  |  |  |  138|  5.17k|    }
  |  |  ------------------
  ------------------
  322|  5.15k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  5.15k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.15k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.13k, False: 18]
  |  |  |  |  |  Branch (739:52): [True: 5.12k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  5.12k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.12k|#  define MINBPC(enc) 2
  ------------------
  324|  5.12k|        return tok;
  325|  5.12k|      }
  326|       |      /* fall through */
  327|     40|    default:
  ------------------
  |  Branch (327:5): [True: 11, False: 27.6k]
  ------------------
  328|     40|      *nextTokPtr = ptr;
  329|     40|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     40|#define XML_TOK_INVALID 0
  ------------------
  330|  27.6k|    }
  331|  27.6k|  }
  332|     62|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     62|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  8.33k|}
xmltok.c:little2_checkPiTarget:
  232|  8.21k|                      int *tokPtr) {
  233|  8.21k|  int upper = 0;
  234|  8.21k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.21k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  8.21k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  8.21k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  8.21k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  8.21k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.99k, False: 6.22k]
  ------------------
  237|  1.99k|    return 1;
  238|  6.22k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  6.22k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  6.22k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 5.53k, False: 690]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  2.44k|  case ASCII_x:
  ------------------
  |  |   86|  2.44k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 2.44k, False: 3.77k]
  ------------------
  240|  2.44k|    break;
  241|  1.87k|  case ASCII_X:
  ------------------
  |  |   59|  1.87k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.87k, False: 4.35k]
  ------------------
  242|  1.87k|    upper = 1;
  243|  1.87k|    break;
  244|  1.90k|  default:
  ------------------
  |  Branch (244:3): [True: 1.90k, False: 4.31k]
  ------------------
  245|  1.90k|    return 1;
  246|  6.22k|  }
  247|  4.31k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.31k|#  define MINBPC(enc) 2
  ------------------
  248|  4.31k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  4.31k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  4.31k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 3.49k, False: 828]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    847|  case ASCII_m:
  ------------------
  |  |   75|    847|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 847, False: 3.47k]
  ------------------
  250|    847|    break;
  251|  2.51k|  case ASCII_M:
  ------------------
  |  |   48|  2.51k|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 2.51k, False: 1.80k]
  ------------------
  252|  2.51k|    upper = 1;
  253|  2.51k|    break;
  254|    953|  default:
  ------------------
  |  Branch (254:3): [True: 953, False: 3.36k]
  ------------------
  255|    953|    return 1;
  256|  4.31k|  }
  257|  3.36k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.36k|#  define MINBPC(enc) 2
  ------------------
  258|  3.36k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.36k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.36k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.30k, False: 1.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     39|  case ASCII_l:
  ------------------
  |  |   74|     39|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 39, False: 3.32k]
  ------------------
  260|     39|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 3.36k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  3.32k|  default:
  ------------------
  |  Branch (264:3): [True: 3.32k, False: 41]
  ------------------
  265|  3.32k|    return 1;
  266|  3.36k|  }
  267|     41|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 37]
  ------------------
  268|      4|    return 0;
  269|     37|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     37|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     37|  return 1;
  271|     41|}
xmltok.c:little2_scanPercent:
  924|  1.26k|                    const char **nextTokPtr) {
  925|  1.26k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.26k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.26k|    {                                                                          \
  |  |  |  |  135|  1.26k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.26k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.26k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 1.26k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  1.26k|    }
  |  |  ------------------
  ------------------
  926|  1.26k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.26k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.26k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.09k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.09k, False: 170]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|    614|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    580|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 151, False: 1.10k]
  |  |  ------------------
  |  |  111|    580|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    151|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    151|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    151|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 138]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|    580|    /* fall through */                                                         \
  |  |  116|    580|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 301, False: 959]
  |  |  ------------------
  |  |  117|    580|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 141, False: 1.11k]
  |  |  ------------------
  |  |  118|    580|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|    580|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    580|    break;                                                                     \
  |  |  120|    580|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.26k]
  |  |  |  |  ------------------
  |  |  |  |  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.26k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     14|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 1.24k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     20|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    118|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 118, False: 1.14k]
  ------------------
  929|    213|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 95, False: 1.16k]
  ------------------
  930|    644|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 431, False: 829]
  ------------------
  931|    647|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 1.25k]
  ------------------
  932|    647|    *nextTokPtr = ptr;
  933|    647|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    647|#define XML_TOK_PERCENT 22
  ------------------
  934|      6|  default:
  ------------------
  |  Branch (934:3): [True: 6, False: 1.25k]
  ------------------
  935|      6|    *nextTokPtr = ptr;
  936|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  937|  1.26k|  }
  938|  2.41k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.41k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.41k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.41k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.91k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.91k, False: 504]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  5.41k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.90k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 489, False: 1.93k]
  |  |  ------------------
  |  |   82|  1.90k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    489|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    489|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    489|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 23, False: 466]
  |  |  ------------------
  |  |   83|     23|      *nextTokPtr = ptr;                                                       \
  |  |   84|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     23|    }                                                                          \
  |  |   86|  1.90k|    /* fall through */                                                         \
  |  |   87|  1.90k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 312, False: 2.10k]
  |  |  ------------------
  |  |   88|  1.07k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 298, False: 2.12k]
  |  |  ------------------
  |  |   89|  1.43k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 354, False: 2.06k]
  |  |  ------------------
  |  |   90|  1.62k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 196, False: 2.22k]
  |  |  ------------------
  |  |   91|  1.90k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 282, False: 2.13k]
  |  |  ------------------
  |  |   92|  1.90k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.90k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.90k|    break;                                                                     \
  |  |   94|  1.90k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.41k]
  |  |  |  |  ------------------
  |  |  |  |   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.41k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 2.41k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|    465|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 465, False: 1.95k]
  ------------------
  942|    465|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    465|#  define MINBPC(enc) 2
  ------------------
  943|    465|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    465|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     15|    default:
  ------------------
  |  Branch (944:5): [True: 15, False: 2.40k]
  ------------------
  945|     15|      *nextTokPtr = ptr;
  946|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  947|  2.41k|    }
  948|  2.41k|  }
  949|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    580|}
xmltok.c:little2_scanPoundName:
  954|  1.63k|                      const char **nextTokPtr) {
  955|  1.63k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.63k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.63k|    {                                                                          \
  |  |  |  |  135|  1.63k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.63k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.63k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.62k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.63k|    }
  |  |  ------------------
  ------------------
  956|  1.62k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.62k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.62k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.55k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.55k, False: 69]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|    750|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.59k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 47, False: 1.58k]
  |  |  ------------------
  |  |  111|  1.59k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     47|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     47|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     47|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 34]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  1.59k|    /* fall through */                                                         \
  |  |  116|  1.59k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 639, False: 989]
  |  |  ------------------
  |  |  117|  1.59k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 920, False: 708]
  |  |  ------------------
  |  |  118|  1.59k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.59k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.59k|    break;                                                                     \
  |  |  120|  1.59k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.62k]
  |  |  |  |  ------------------
  |  |  |  |  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.62k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 1.61k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 1.62k]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|  1.62k|  }
  962|  10.6k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  10.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  10.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.0k, False: 510]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  30.8k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  9.05k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 491, False: 10.1k]
  |  |  ------------------
  |  |   82|  9.05k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    491|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    491|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    491|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 23, False: 468]
  |  |  ------------------
  |  |   83|     23|      *nextTokPtr = ptr;                                                       \
  |  |   84|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     23|    }                                                                          \
  |  |   86|  9.05k|    /* fall through */                                                         \
  |  |   87|  9.05k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.35k, False: 6.25k]
  |  |  ------------------
  |  |   88|  8.25k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.43k, False: 7.16k]
  |  |  ------------------
  |  |   89|  8.48k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 223, False: 10.3k]
  |  |  ------------------
  |  |   90|  8.81k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 336, False: 10.2k]
  |  |  ------------------
  |  |   91|  9.05k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 240, False: 10.3k]
  |  |  ------------------
  |  |   92|  9.05k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  9.05k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  9.05k|    break;                                                                     \
  |  |   94|  9.05k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 10.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: 10.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|     12|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 10.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 8]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     16|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|      8|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    462|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 462, False: 10.1k]
  ------------------
  966|  1.32k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 865, False: 9.73k]
  ------------------
  967|  1.41k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 91, False: 10.5k]
  ------------------
  968|  1.45k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 38, False: 10.5k]
  ------------------
  969|  1.47k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 18, False: 10.5k]
  ------------------
  970|  1.47k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 10.6k]
  ------------------
  971|  1.49k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 18, False: 10.5k]
  ------------------
  972|  1.49k|      *nextTokPtr = ptr;
  973|  1.49k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.49k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     17|    default:
  ------------------
  |  Branch (974:5): [True: 17, False: 10.5k]
  ------------------
  975|     17|      *nextTokPtr = ptr;
  976|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  977|  10.6k|    }
  978|  10.6k|  }
  979|     48|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     48|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  1.59k|}
xmltok.c:little2_contentTok:
  824|   105k|                   const char **nextTokPtr) {
  825|   105k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 818, False: 104k]
  ------------------
  826|    818|    return XML_TOK_NONE;
  ------------------
  |  |   51|    818|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|   104k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|   104k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|   104k|    size_t n = end - ptr;
  829|   104k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|   104k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 51.5k, False: 53.0k]
  ------------------
  830|  51.5k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  51.5k|#  define MINBPC(enc) 2
  ------------------
  831|  51.5k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 135, False: 51.4k]
  ------------------
  832|    135|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    135|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  51.4k|      end = ptr + n;
  834|  51.4k|    }
  835|   104k|  }
  836|   104k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   104k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   104k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  82.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 82.7k, False: 21.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  20.0k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 20.0k, False: 84.3k]
  ------------------
  838|  20.0k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  20.0k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  20.0k|#  define MINBPC(enc) 2
  ------------------
  839|  23.1k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 23.1k, False: 81.2k]
  ------------------
  840|  23.1k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  23.1k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  23.1k|#  define MINBPC(enc) 2
  ------------------
  841|  19.6k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 19.6k, False: 84.7k]
  ------------------
  842|  19.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  19.6k|#  define MINBPC(enc) 2
  ------------------
  843|  19.6k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  19.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  19.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  19.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 14, False: 19.6k]
  ------------------
  844|     14|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     14|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  19.6k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  19.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  19.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.71k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.71k, False: 10.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 596, False: 19.0k]
  ------------------
  846|    596|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    596|#  define MINBPC(enc) 2
  ------------------
  847|  19.6k|    *nextTokPtr = ptr;
  848|  19.6k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  19.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  5.63k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 5.63k, False: 98.8k]
  ------------------
  850|  5.63k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.63k|#  define MINBPC(enc) 2
  ------------------
  851|  5.63k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  5.63k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  7.82k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 7.82k, False: 96.6k]
  ------------------
  853|  7.82k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.82k|#  define MINBPC(enc) 2
  ------------------
  854|  7.82k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.82k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.82k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  7.82k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 5, False: 7.81k]
  ------------------
  855|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  7.81k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  7.81k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  7.81k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.76k, False: 1.05k]
  |  |  |  |  |  Branch (739:52): [True: 5.94k, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.87k|      break;
  858|  5.94k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.94k|#  define MINBPC(enc) 2
  ------------------
  859|  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)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.94k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 8, False: 5.93k]
  ------------------
  860|      8|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      8|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  5.93k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  5.93k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.93k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.30k, False: 631]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 5.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  5.93k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  5.93k|#  define MINBPC(enc) 2
  ------------------
  863|  5.93k|      break;
  864|  5.93k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  17.9k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |   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: 104k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  8.92k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.88k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.92k, False: 95.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.92k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 39, False: 8.88k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.88k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     39|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.88k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  8.88k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  8.88k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.88k|    break;
  |  |  ------------------
  |  |   63|  8.88k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 62, False: 104k]
  |  |  ------------------
  |  |   64|     62|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 104k]
  |  |  ------------------
  |  |   65|     70|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 104k]
  |  |  ------------------
  |  |   66|     70|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     70|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     70|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  19.0k|  default:
  ------------------
  |  Branch (868:3): [True: 19.0k, False: 85.3k]
  ------------------
  869|  19.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  19.0k|#  define MINBPC(enc) 2
  ------------------
  870|  19.0k|    break;
  871|   104k|  }
  872|  1.30M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  1.30M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.30M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.30M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   103k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 103k, False: 1.20M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.30M]
  |  |  ------------------
  |  |  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.30M]
  |  |  ------------------
  |  |  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|  54.9k|      LEAD_CASE(4)
  ------------------
  |  |  875|  54.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 54.9k, False: 1.25M]
  |  |  ------------------
  |  |  876|  54.9k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  54.9k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 33, False: 54.9k]
  |  |  ------------------
  |  |  877|     33|      *nextTokPtr = ptr;                                                       \
  |  |  878|     33|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     33|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     33|    }                                                                          \
  |  |  880|  54.9k|    ptr += n;                                                                  \
  |  |  881|  54.9k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  12.8k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 12.8k, False: 1.29M]
  ------------------
  887|  12.8k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  12.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  12.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 12.8k, False: 2]
  |  |  ------------------
  ------------------
  888|  12.8k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  12.8k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  12.8k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 10.4k, False: 2.40k]
  |  |  |  |  |  Branch (739:52): [True: 2.66k, False: 7.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  10.2k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.2k|#  define MINBPC(enc) 2
  ------------------
  890|  10.2k|          break;
  891|  10.2k|        }
  892|  2.66k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  2.66k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  2.66k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.66k, False: 7]
  |  |  ------------------
  ------------------
  893|  2.66k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|  2.66k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.66k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.75k, False: 909]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 1.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  2.65k|            ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.65k|#  define MINBPC(enc) 2
  ------------------
  895|  2.65k|            break;
  896|  2.65k|          }
  897|      2|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      2|#  define MINBPC(enc) 2
  ------------------
  898|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  899|  2.66k|        }
  900|  2.66k|      }
  901|       |      /* fall through */
  902|  5.75k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 5.74k, False: 1.30M]
  ------------------
  903|  13.0k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 7.33k, False: 1.30M]
  ------------------
  904|  13.1k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 48, False: 1.30M]
  ------------------
  905|  13.1k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 1.30M]
  ------------------
  906|  13.1k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 5, False: 1.30M]
  ------------------
  907|  30.4k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 17.3k, False: 1.29M]
  ------------------
  908|  35.3k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 4.90k, False: 1.30M]
  ------------------
  909|  35.3k|      *nextTokPtr = ptr;
  910|  35.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  35.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  1.20M|    default:
  ------------------
  |  Branch (911:5): [True: 1.20M, False: 103k]
  ------------------
  912|  1.20M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.20M|#  define MINBPC(enc) 2
  ------------------
  913|  1.20M|      break;
  914|  1.30M|    }
  915|  1.30M|  }
  916|    336|  *nextTokPtr = ptr;
  917|    336|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    336|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  35.7k|}
xmltok.c:little2_scanLt:
  726|  20.0k|               const char **nextTokPtr) {
  727|  20.0k|#  ifdef XML_NS
  728|  20.0k|  int hadColon;
  729|  20.0k|#  endif
  730|  20.0k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  20.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  20.0k|    {                                                                          \
  |  |  |  |  135|  20.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  20.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  20.0k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 20.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  20.0k|    }
  |  |  ------------------
  ------------------
  731|  20.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  20.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  20.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 17.1k, False: 2.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.1k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.82k, False: 17.2k]
  |  |  ------------------
  |  |  111|  11.0k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  2.82k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  2.82k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.82k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 28, False: 2.79k]
  |  |  ------------------
  |  |  112|     28|      *nextTokPtr = ptr;                                                       \
  |  |  113|     28|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     28|    }                                                                          \
  |  |  115|  11.0k|    /* fall through */                                                         \
  |  |  116|  11.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.50k, False: 15.5k]
  |  |  ------------------
  |  |  117|  11.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.79k, False: 16.2k]
  |  |  ------------------
  |  |  118|  11.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  11.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  11.0k|    break;                                                                     \
  |  |  120|  11.0k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 20.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: 20.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|     23|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 23, False: 20.0k]
  |  |  |  |  ------------------
  |  |  |  |  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|  1.51k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.51k, False: 18.5k]
  ------------------
  734|  1.51k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.51k|#  define MINBPC(enc) 2
  ------------------
  735|  1.51k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.51k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.51k|    {                                                                          \
  |  |  |  |  135|  1.51k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.51k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.51k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.50k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.51k|    }
  |  |  ------------------
  ------------------
  736|  1.50k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.50k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.50k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.48k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 22, False: 1.48k]
  |  |  |  |  |  Branch (737:4): [True: 1.48k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    236|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 236, False: 1.27k]
  ------------------
  738|    236|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    236|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    236|#  define MINBPC(enc) 2
  ------------------
  739|  1.25k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 1.25k, False: 258]
  ------------------
  740|  1.25k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.25k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.25k|#  define MINBPC(enc) 2
  ------------------
  741|  1.50k|    }
  742|     22|    *nextTokPtr = ptr;
  743|     22|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  744|  5.73k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 5.73k, False: 14.3k]
  ------------------
  745|  5.73k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.73k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.73k|#  define MINBPC(enc) 2
  ------------------
  746|  1.66k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.66k, False: 18.3k]
  ------------------
  747|  1.66k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.66k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.66k|#  define MINBPC(enc) 2
  ------------------
  748|      9|  default:
  ------------------
  |  Branch (748:3): [True: 9, False: 20.0k]
  ------------------
  749|      9|    *nextTokPtr = ptr;
  750|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  751|  20.0k|  }
  752|  11.0k|#  ifdef XML_NS
  753|  11.0k|  hadColon = 0;
  754|  11.0k|#  endif
  755|       |  /* we have a start-tag */
  756|  20.6k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  20.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  20.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  20.6k|  ((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: 7.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  43.4k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  9.62k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 7.67k, False: 12.9k]
  |  |  ------------------
  |  |   82|  9.62k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  7.67k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  7.67k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  7.67k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 20, False: 7.65k]
  |  |  ------------------
  |  |   83|     20|      *nextTokPtr = ptr;                                                       \
  |  |   84|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     20|    }                                                                          \
  |  |   86|  9.62k|    /* fall through */                                                         \
  |  |   87|  9.62k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 848, False: 19.8k]
  |  |  ------------------
  |  |   88|  8.81k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 315, False: 20.3k]
  |  |  ------------------
  |  |   89|  9.08k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 270, False: 20.3k]
  |  |  ------------------
  |  |   90|  9.32k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 234, False: 20.4k]
  |  |  ------------------
  |  |   91|  9.62k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 306, False: 20.3k]
  |  |  ------------------
  |  |   92|  9.62k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  9.62k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  9.62k|    break;                                                                     \
  |  |   94|  9.62k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 20.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: 20.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|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 20.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 20.6k]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  2.87k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.87k, False: 17.7k]
  ------------------
  777|  3.60k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 732, False: 19.9k]
  ------------------
  778|  4.46k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 858, False: 19.8k]
  ------------------
  779|  4.46k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.46k|#  define MINBPC(enc) 2
  ------------------
  780|  6.44k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  6.44k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.44k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.44k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.71k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.71k, False: 734]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  2.80k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.77k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 705, False: 5.74k]
  |  |  ------------------
  |  |  111|  2.77k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    705|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    705|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    705|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 691]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  2.77k|    /* fall through */                                                         \
  |  |  116|  2.77k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.36k, False: 5.08k]
  |  |  ------------------
  |  |  117|  2.77k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 715, False: 5.73k]
  |  |  ------------------
  |  |  118|  2.77k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.77k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.77k|    break;                                                                     \
  |  |  120|  2.77k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.44k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.44k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     24|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 24, False: 6.42k]
  |  |  |  |  ------------------
  |  |  |  |  100|     24|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 20]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     40|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|     20|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    890|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 890, False: 5.55k]
  ------------------
  784|    890|          goto gt;
  785|    732|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 732, False: 5.71k]
  ------------------
  786|    732|          goto sol;
  787|    246|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 246, False: 6.20k]
  ------------------
  788|  1.11k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 873, False: 5.57k]
  ------------------
  789|  2.01k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 891, False: 5.55k]
  ------------------
  790|  2.01k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.01k|#  define MINBPC(enc) 2
  ------------------
  791|  2.01k|          continue;
  792|      8|        default:
  ------------------
  |  Branch (792:9): [True: 8, False: 6.44k]
  ------------------
  793|      8|          *nextTokPtr = ptr;
  794|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  795|  6.44k|        }
  796|  2.77k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.77k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  6.44k|      }
  798|     28|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.46k|    }
  800|  6.27k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 6.27k, False: 14.3k]
  ------------------
  801|  7.16k|    gt:
  802|  7.16k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  7.16k|#  define MINBPC(enc) 2
  ------------------
  803|  7.16k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  7.16k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    255|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 255, False: 20.4k]
  ------------------
  805|    987|    sol:
  806|    987|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    987|#  define MINBPC(enc) 2
  ------------------
  807|    987|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    987|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    987|    {                                                                          \
  |  |  |  |  135|    987|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    987|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    987|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 982]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|    987|    }
  |  |  ------------------
  ------------------
  808|    982|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    982|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    982|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 977, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 961, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     21|        *nextTokPtr = ptr;
  810|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  811|     21|      }
  812|    961|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    961|#  define MINBPC(enc) 2
  ------------------
  813|    961|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    961|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      9|    default:
  ------------------
  |  Branch (814:5): [True: 9, False: 20.6k]
  ------------------
  815|      9|      *nextTokPtr = ptr;
  816|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  817|  20.6k|    }
  818|  20.6k|  }
  819|     55|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     55|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  11.0k|}
xmltok.c:little2_scanCdataSection:
  337|  1.25k|                         const char **nextTokPtr) {
  338|  1.25k|  static const char CDATA_LSQB[]
  339|  1.25k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  1.25k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  1.25k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.25k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  1.25k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.25k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  1.25k|#define ASCII_LSQB 0x5B
  ------------------
  340|  1.25k|  int i;
  341|  1.25k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.25k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  1.25k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  1.25k|    {                                                                          \
  |  |  135|  1.25k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  1.25k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.25k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 5, False: 1.24k]
  |  |  ------------------
  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      5|      }                                                                        \
  |  |  138|  1.25k|    }
  ------------------
  344|  8.67k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  7.43k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 7.44k, False: 1.23k]
  ------------------
  345|  7.44k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  7.44k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  7.44k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 7.43k, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 7.43k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     13|      *nextTokPtr = ptr;
  347|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  348|     13|    }
  349|  7.44k|  }
  350|  1.23k|  *nextTokPtr = ptr;
  351|  1.23k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  1.23k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  1.24k|}
xmltok.c:little2_scanEndTag:
  432|  1.66k|                   const char **nextTokPtr) {
  433|  1.66k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.66k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.66k|    {                                                                          \
  |  |  |  |  135|  1.66k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.66k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.66k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.66k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.66k|    }
  |  |  ------------------
  ------------------
  434|  1.66k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.66k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.66k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.16k, False: 495]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.46k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.63k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 471, False: 1.18k]
  |  |  ------------------
  |  |  111|  1.63k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    471|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    471|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    471|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 3, False: 468]
  |  |  ------------------
  |  |  112|      3|      *nextTokPtr = ptr;                                                       \
  |  |  113|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      3|    }                                                                          \
  |  |  115|  1.63k|    /* fall through */                                                         \
  |  |  116|  1.63k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 495, False: 1.16k]
  |  |  ------------------
  |  |  117|  1.63k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 669, False: 991]
  |  |  ------------------
  |  |  118|  1.63k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.63k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.63k|    break;                                                                     \
  |  |  120|  1.63k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.66k]
  |  |  |  |  ------------------
  |  |  |  |  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.66k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      8|  default:
  ------------------
  |  Branch (436:3): [True: 8, False: 1.65k]
  ------------------
  437|      8|    *nextTokPtr = ptr;
  438|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  439|  1.66k|  }
  440|  22.7k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  22.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  22.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  22.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.93k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.93k, False: 19.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|   102k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  21.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 19.8k, False: 2.95k]
  |  |  ------------------
  |  |   82|  21.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  19.8k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  19.8k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  19.8k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 22, False: 19.7k]
  |  |  ------------------
  |  |   83|     22|      *nextTokPtr = ptr;                                                       \
  |  |   84|     22|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     22|    }                                                                          \
  |  |   86|  21.2k|    /* fall through */                                                         \
  |  |   87|  21.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 389, False: 22.3k]
  |  |  ------------------
  |  |   88|  20.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 399, False: 22.3k]
  |  |  ------------------
  |  |   89|  20.8k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 219, False: 22.5k]
  |  |  ------------------
  |  |   90|  20.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 195, False: 22.5k]
  |  |  ------------------
  |  |   91|  21.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 204, False: 22.5k]
  |  |  ------------------
  |  |   92|  21.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  21.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  21.2k|    break;                                                                     \
  |  |   94|  21.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 22.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 22.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     14|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 22.7k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      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;
  |  |  ------------------
  ------------------
  443|    313|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 313, False: 22.4k]
  ------------------
  444|    573|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 260, False: 22.5k]
  ------------------
  445|  1.00k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 430, False: 22.3k]
  ------------------
  446|  1.95k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.00k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    983|#  define MINBPC(enc) 2
  ------------------
  447|  1.95k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.95k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.95k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.93k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.93k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    272|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 272, False: 1.67k]
  ------------------
  449|    697|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 425, False: 1.52k]
  ------------------
  450|    983|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 286, False: 1.66k]
  ------------------
  451|    983|          break;
  452|    943|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 943, False: 1.00k]
  ------------------
  453|    943|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    943|#  define MINBPC(enc) 2
  ------------------
  454|    943|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    943|#define XML_TOK_END_TAG 5
  ------------------
  455|     25|        default:
  ------------------
  |  Branch (455:9): [True: 25, False: 1.92k]
  ------------------
  456|     25|          *nextTokPtr = ptr;
  457|     25|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  458|  1.95k|        }
  459|  1.95k|      }
  460|     35|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     35|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 22.7k]
  ------------------
  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|    527|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 527, False: 22.2k]
  ------------------
  469|    527|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    527|#  define MINBPC(enc) 2
  ------------------
  470|    527|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    527|#define XML_TOK_END_TAG 5
  ------------------
  471|      9|    default:
  ------------------
  |  Branch (471:5): [True: 9, False: 22.7k]
  ------------------
  472|      9|      *nextTokPtr = ptr;
  473|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  474|  22.7k|    }
  475|  22.7k|  }
  476|     57|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     57|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.63k|}
xmltok.c:little2_scanAtts:
  573|  2.77k|                 const char **nextTokPtr) {
  574|  2.77k|#  ifdef XML_NS
  575|  2.77k|  int hadColon = 0;
  576|  2.77k|#  endif
  577|   234k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   234k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   234k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   234k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   233k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 233k, False: 1.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  12.2k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.52k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.10k, False: 233k]
  |  |  ------------------
  |  |   82|  3.52k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.10k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.10k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.10k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 23, False: 1.08k]
  |  |  ------------------
  |  |   83|     23|      *nextTokPtr = ptr;                                                       \
  |  |   84|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     23|    }                                                                          \
  |  |   86|  3.52k|    /* fall through */                                                         \
  |  |   87|  3.52k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 875, False: 233k]
  |  |  ------------------
  |  |   88|  2.79k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 837, False: 233k]
  |  |  ------------------
  |  |   89|  3.07k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 277, False: 234k]
  |  |  ------------------
  |  |   90|  3.26k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 234k]
  |  |  ------------------
  |  |   91|  3.52k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 263, False: 234k]
  |  |  ------------------
  |  |   92|  3.52k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  3.52k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  3.52k|    break;                                                                     \
  |  |   94|  3.52k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 234k]
  |  |  |  |  ------------------
  |  |  |  |   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: 234k]
  |  |  |  |  ------------------
  |  |  |  |   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|     12|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 234k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 8]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     16|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|      8|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 234k]
  ------------------
  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|    423|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 423, False: 234k]
  ------------------
  598|    777|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 354, False: 234k]
  ------------------
  599|    859|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 82, False: 234k]
  ------------------
  600|  1.67k|      for (;;) {
  601|  1.67k|        int t;
  602|       |
  603|  1.67k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.67k|#  define MINBPC(enc) 2
  ------------------
  604|  1.67k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.67k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.67k|    {                                                                          \
  |  |  |  |  135|  1.67k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.67k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.67k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 35, False: 1.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|     35|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     35|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     35|      }                                                                        \
  |  |  |  |  138|  1.67k|    }
  |  |  ------------------
  ------------------
  605|  1.63k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  1.63k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.63k|  ((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: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.63k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 803, False: 834]
  ------------------
  607|    803|          break;
  608|    834|        switch (t) {
  609|    333|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 333, False: 501]
  ------------------
  610|    561|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 228, False: 606]
  ------------------
  611|    813|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 252, False: 582]
  ------------------
  612|    813|          break;
  613|     21|        default:
  ------------------
  |  Branch (613:9): [True: 21, False: 813]
  ------------------
  614|     21|          *nextTokPtr = ptr;
  615|     21|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  616|    834|        }
  617|    834|      }
  618|       |      /* fall through */
  619|   230k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 230k, False: 4.43k]
  ------------------
  620|   230k|      int open;
  621|   230k|#  ifdef XML_NS
  622|   230k|      hadColon = 0;
  623|   230k|#  endif
  624|   231k|      for (;;) {
  625|   231k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   231k|#  define MINBPC(enc) 2
  ------------------
  626|   231k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   231k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   231k|    {                                                                          \
  |  |  |  |  135|   231k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   231k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   231k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 33, False: 231k]
  |  |  |  |  ------------------
  |  |  |  |  136|     33|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     33|      }                                                                        \
  |  |  |  |  138|   231k|    }
  |  |  ------------------
  ------------------
  627|   231k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   231k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   231k|  ((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: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   231k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 2.33k, False: 229k]
  |  Branch (628:32): [True: 228k, False: 819]
  ------------------
  629|   230k|          break;
  630|    819|        switch (open) {
  631|    232|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 232, False: 587]
  ------------------
  632|    527|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 295, False: 524]
  ------------------
  633|    789|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 262, False: 557]
  ------------------
  634|    789|          break;
  635|     30|        default:
  ------------------
  |  Branch (635:9): [True: 30, False: 789]
  ------------------
  636|     30|          *nextTokPtr = ptr;
  637|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  638|    819|        }
  639|    819|      }
  640|   230k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   230k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  5.25M|      for (;;) {
  643|  5.25M|        int t;
  644|  5.25M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.25M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.25M|    {                                                                          \
  |  |  |  |  135|  5.25M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.25M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.25M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 5.25M]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|  5.25M|    }
  |  |  ------------------
  ------------------
  645|  5.25M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  5.25M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.25M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.18M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.18M, False: 4.06M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  5.25M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 230k, False: 5.02M]
  ------------------
  647|   230k|          break;
  648|  5.02M|        switch (t) {
  649|   163k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 5.02M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 5.02M]
  |  |  |  |  ------------------
  |  |  |  |   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|  81.9k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  81.9k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 81.9k, False: 4.93M]
  |  |  |  |  ------------------
  |  |  |  |   50|  81.9k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 16, False: 81.9k]
  |  |  |  |  ------------------
  |  |  |  |   51|  81.9k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     16|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  81.9k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  81.9k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  81.9k|    ptr += n;                                                                  \
  |  |  |  |   57|  81.9k|    break;
  |  |  ------------------
  |  |   63|  81.9k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 8, False: 5.02M]
  |  |  ------------------
  |  |   64|      8|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 5.02M]
  |  |  ------------------
  |  |   65|     14|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 5.02M]
  |  |  ------------------
  |  |   66|     14|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     14|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  81.8k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 81.8k, False: 4.93M]
  ------------------
  651|  81.8k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  81.8k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  81.8k|#  define MINBPC(enc) 2
  ------------------
  652|  81.8k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 18, False: 81.8k]
  ------------------
  653|     18|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 11, False: 7]
  ------------------
  654|     11|              *nextTokPtr = ptr;
  655|     18|            return tok;
  656|     18|          }
  657|  81.8k|          break;
  658|  81.8k|        }
  659|  81.8k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 9, False: 5.02M]
  ------------------
  660|      9|          *nextTokPtr = ptr;
  661|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  662|  4.85M|        default:
  ------------------
  |  Branch (662:9): [True: 4.85M, False: 163k]
  ------------------
  663|  4.85M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.85M|#  define MINBPC(enc) 2
  ------------------
  664|  4.85M|          break;
  665|  5.02M|        }
  666|  5.02M|      }
  667|   230k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   230k|#  define MINBPC(enc) 2
  ------------------
  668|   230k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   230k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   230k|    {                                                                          \
  |  |  |  |  135|   230k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   230k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   230k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 230k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   230k|    }
  |  |  ------------------
  ------------------
  669|   230k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   230k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   230k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   230k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 230k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   225k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 225k, False: 4.80k]
  ------------------
  671|   226k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 621, False: 230k]
  ------------------
  672|   229k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 2.59k, False: 228k]
  ------------------
  673|   229k|        break;
  674|    580|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 580, False: 230k]
  ------------------
  675|    580|        goto sol;
  676|    976|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 976, False: 229k]
  ------------------
  677|    976|        goto gt;
  678|     28|      default:
  ------------------
  |  Branch (678:7): [True: 28, False: 230k]
  ------------------
  679|     28|        *nextTokPtr = ptr;
  680|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  681|   230k|      }
  682|       |      /* ptr points to closing quote */
  683|   231k|      for (;;) {
  684|   231k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   231k|#  define MINBPC(enc) 2
  ------------------
  685|   231k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   231k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   231k|    {                                                                          \
  |  |  |  |  135|   231k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   231k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   231k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 30, False: 231k]
  |  |  |  |  ------------------
  |  |  |  |  136|     30|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     30|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     30|      }                                                                        \
  |  |  |  |  138|   231k|    }
  |  |  ------------------
  ------------------
  686|   231k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   231k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   231k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   230k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 230k, False: 595]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   182k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   228k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 575, False: 230k]
  |  |  ------------------
  |  |  111|   228k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    575|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    575|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    575|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 10, False: 565]
  |  |  ------------------
  |  |  112|     10|      *nextTokPtr = ptr;                                                       \
  |  |  113|     10|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     10|    }                                                                          \
  |  |  115|   228k|    /* fall through */                                                         \
  |  |  116|   228k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 181k, False: 49.4k]
  |  |  ------------------
  |  |  117|   228k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 45.9k, False: 185k]
  |  |  ------------------
  |  |  118|   228k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   228k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   228k|    break;                                                                     \
  |  |  120|   228k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 231k]
  |  |  |  |  ------------------
  |  |  |  |  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: 231k]
  |  |  |  |  ------------------
  |  |  |  |  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: 231k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 3, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|  1.16k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 1.16k, False: 230k]
  ------------------
  689|  1.69k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 531, False: 230k]
  ------------------
  690|  2.14k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 455, False: 230k]
  ------------------
  691|  2.14k|          continue;
  692|    302|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 302, False: 230k]
  ------------------
  693|  1.27k|        gt:
  694|  1.27k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.27k|#  define MINBPC(enc) 2
  ------------------
  695|  1.27k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.27k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    476|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 476, False: 230k]
  ------------------
  697|  1.05k|        sol:
  698|  1.05k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.05k|#  define MINBPC(enc) 2
  ------------------
  699|  1.05k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.05k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.05k|    {                                                                          \
  |  |  |  |  135|  1.05k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.05k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.05k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  1.05k|    }
  |  |  ------------------
  ------------------
  700|  1.05k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.05k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.05k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.04k, False: 6]
  |  |  |  |  |  Branch (739:52): [True: 1.03k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     13|            *nextTokPtr = ptr;
  702|     13|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  703|     13|          }
  704|  1.03k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.03k|#  define MINBPC(enc) 2
  ------------------
  705|  1.03k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  1.03k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      8|        default:
  ------------------
  |  Branch (706:9): [True: 8, False: 231k]
  ------------------
  707|      8|          *nextTokPtr = ptr;
  708|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  709|   231k|        }
  710|   228k|        break;
  711|   231k|      }
  712|   228k|      break;
  713|   229k|    }
  714|   228k|    default:
  ------------------
  |  Branch (714:5): [True: 14, False: 234k]
  ------------------
  715|     14|      *nextTokPtr = ptr;
  716|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  717|   234k|    }
  718|   234k|  }
  719|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.77k|}
xmltok.c:little2_scanRef:
  545|   190k|                const char **nextTokPtr) {
  546|   190k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   190k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   190k|    {                                                                          \
  |  |  |  |  135|   190k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   190k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   190k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 22, False: 190k]
  |  |  |  |  ------------------
  |  |  |  |  136|     22|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     22|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     22|      }                                                                        \
  |  |  |  |  138|   190k|    }
  |  |  ------------------
  ------------------
  547|   190k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   190k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   190k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   189k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 189k, False: 1.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  6.85k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   183k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.71k, False: 189k]
  |  |  ------------------
  |  |  111|   183k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.71k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.71k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.71k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 20, False: 1.69k]
  |  |  ------------------
  |  |  112|     20|      *nextTokPtr = ptr;                                                       \
  |  |  113|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     20|    }                                                                          \
  |  |  115|   183k|    /* fall through */                                                         \
  |  |  116|   183k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.42k, False: 187k]
  |  |  ------------------
  |  |  117|   183k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 178k, False: 12.1k]
  |  |  ------------------
  |  |  118|   183k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   183k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   183k|    break;                                                                     \
  |  |  120|   183k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 190k]
  |  |  |  |  ------------------
  |  |  |  |  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: 190k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     11|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 190k]
  |  |  |  |  ------------------
  |  |  |  |  100|     11|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     12|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      6|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  6.99k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 6.99k, False: 183k]
  ------------------
  550|  6.99k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  6.99k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  6.99k|#  define MINBPC(enc) 2
  ------------------
  551|      9|  default:
  ------------------
  |  Branch (551:3): [True: 9, False: 190k]
  ------------------
  552|      9|    *nextTokPtr = ptr;
  553|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  554|   190k|  }
  555|   236k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   236k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   236k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   236k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   227k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 227k, False: 8.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   210k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  52.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 8.33k, False: 227k]
  |  |  ------------------
  |  |   82|  52.4k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  8.33k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  8.33k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  8.33k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 53, False: 8.28k]
  |  |  ------------------
  |  |   83|     53|      *nextTokPtr = ptr;                                                       \
  |  |   84|     53|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     53|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     53|    }                                                                          \
  |  |   86|  52.4k|    /* fall through */                                                         \
  |  |   87|  52.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 38.5k, False: 197k]
  |  |  ------------------
  |  |   88|  51.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.42k, False: 231k]
  |  |  ------------------
  |  |   89|  51.9k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 664, False: 235k]
  |  |  ------------------
  |  |   90|  52.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 240, False: 235k]
  |  |  ------------------
  |  |   91|  52.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 233, False: 235k]
  |  |  ------------------
  |  |   92|  52.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  52.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  52.4k|    break;                                                                     \
  |  |   94|  52.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 236k]
  |  |  |  |  ------------------
  |  |  |  |   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: 236k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     18|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 18, False: 236k]
  |  |  |  |  ------------------
  |  |  |  |   71|     18|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   183k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 183k, False: 52.4k]
  ------------------
  559|   183k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   183k|#  define MINBPC(enc) 2
  ------------------
  560|   183k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   183k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     15|    default:
  ------------------
  |  Branch (561:5): [True: 15, False: 236k]
  ------------------
  562|     15|      *nextTokPtr = ptr;
  563|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  564|   236k|    }
  565|   236k|  }
  566|     65|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     65|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   183k|}
xmltok.c:little2_scanCharRef:
  514|  6.99k|                    const char **nextTokPtr) {
  515|  6.99k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  6.99k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.99k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.99k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.98k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  6.98k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  6.98k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.98k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.97k, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 5.52k, False: 1.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  5.52k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.52k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.52k|#  define MINBPC(enc) 2
  ------------------
  518|  1.46k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.46k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.46k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.45k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.45k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.44k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.44k, False: 12]
  ------------------
  520|  1.44k|      break;
  521|     12|    default:
  ------------------
  |  Branch (521:5): [True: 12, False: 1.44k]
  ------------------
  522|     12|      *nextTokPtr = ptr;
  523|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  524|  1.46k|    }
  525|  5.10k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.44k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.66k|#  define MINBPC(enc) 2
  ------------------
  526|  5.10k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.10k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.10k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.08k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  3.66k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.66k, False: 1.44k]
  ------------------
  528|  3.66k|        break;
  529|  1.42k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.42k, False: 3.68k]
  ------------------
  530|  1.42k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.42k|#  define MINBPC(enc) 2
  ------------------
  531|  1.42k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.42k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     22|      default:
  ------------------
  |  Branch (532:7): [True: 22, False: 5.08k]
  ------------------
  533|     22|        *nextTokPtr = ptr;
  534|     22|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  535|  5.10k|      }
  536|  5.10k|    }
  537|  1.44k|  }
  538|     10|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  6.99k|}
xmltok.c:little2_scanHexCharRef:
  483|  5.52k|                       const char **nextTokPtr) {
  484|  5.52k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  5.52k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.52k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 5.52k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  5.52k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.52k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.52k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.52k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.52k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  1.60k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 1.60k, False: 3.91k]
  ------------------
  487|  5.51k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 3.90k, False: 1.61k]
  ------------------
  488|  5.51k|      break;
  489|      8|    default:
  ------------------
  |  Branch (489:5): [True: 8, False: 5.51k]
  ------------------
  490|      8|      *nextTokPtr = ptr;
  491|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  492|  5.52k|    }
  493|  20.1k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  5.51k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  14.6k|#  define MINBPC(enc) 2
  ------------------
  494|  20.1k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  20.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  20.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  20.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 20.1k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  7.49k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 7.49k, False: 12.6k]
  ------------------
  496|  14.6k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 7.16k, False: 12.9k]
  ------------------
  497|  14.6k|        break;
  498|  5.47k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 5.47k, False: 14.6k]
  ------------------
  499|  5.47k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.47k|#  define MINBPC(enc) 2
  ------------------
  500|  5.47k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  5.47k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     26|      default:
  ------------------
  |  Branch (501:7): [True: 26, False: 20.1k]
  ------------------
  502|     26|        *nextTokPtr = ptr;
  503|     26|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  504|  20.1k|      }
  505|  20.1k|    }
  506|  5.51k|  }
  507|     16|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  5.52k|}
xmltok.c:little2_cdataSectionTok:
  356|  50.5k|                        const char **nextTokPtr) {
  357|  50.5k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 109, False: 50.4k]
  ------------------
  358|    109|    return XML_TOK_NONE;
  ------------------
  |  |   51|    109|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  50.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  50.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  50.4k|    size_t n = end - ptr;
  361|  50.4k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  50.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 10.7k, False: 39.6k]
  ------------------
  362|  10.7k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  10.7k|#  define MINBPC(enc) 2
  ------------------
  363|  10.7k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 46, False: 10.6k]
  ------------------
  364|     46|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     46|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  10.6k|      end = ptr + n;
  366|  10.6k|    }
  367|  50.4k|  }
  368|  50.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  50.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  50.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  36.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 36.7k, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  15.5k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 15.5k, False: 34.8k]
  ------------------
  370|  15.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  15.5k|#  define MINBPC(enc) 2
  ------------------
  371|  15.5k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  15.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  15.5k|    {                                                                          \
  |  |  |  |  135|  15.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  15.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  15.5k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  15.5k|    }
  |  |  ------------------
  ------------------
  372|  15.5k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  15.5k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  15.5k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 12.5k, False: 3.00k]
  |  |  |  |  |  Branch (739:52): [True: 7.20k, False: 5.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  8.36k|      break;
  374|  7.20k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.20k|#  define MINBPC(enc) 2
  ------------------
  375|  7.20k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.20k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.20k|    {                                                                          \
  |  |  |  |  135|  7.20k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.20k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 7.20k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  7.20k|    }
  |  |  ------------------
  ------------------
  376|  7.20k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  7.20k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  7.20k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.94k, False: 1.25k]
  |  |  |  |  |  Branch (739:52): [True: 972, False: 4.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  6.23k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  6.23k|#  define MINBPC(enc) 2
  ------------------
  378|  6.23k|      break;
  379|  6.23k|    }
  380|    972|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    972|#  define MINBPC(enc) 2
  ------------------
  381|    972|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    972|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  18.0k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 18.0k, False: 32.3k]
  ------------------
  383|  18.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  18.0k|#  define MINBPC(enc) 2
  ------------------
  384|  18.0k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  18.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  18.0k|    {                                                                          \
  |  |  |  |  135|  18.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  18.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  18.0k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 16, False: 18.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     16|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     16|      }                                                                        \
  |  |  |  |  138|  18.0k|    }
  |  |  ------------------
  ------------------
  385|  18.0k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  18.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  18.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.96k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.96k, False: 13.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 286, False: 17.7k]
  ------------------
  386|    286|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    286|#  define MINBPC(enc) 2
  ------------------
  387|  18.0k|    *nextTokPtr = ptr;
  388|  18.0k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  18.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  2.16k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 2.16k, False: 48.2k]
  ------------------
  390|  2.16k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.16k|#  define MINBPC(enc) 2
  ------------------
  391|  2.16k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.16k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  22.6k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 50.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 50.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  11.3k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  11.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 11.3k, False: 39.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  11.3k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 37, False: 11.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  11.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     37|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  11.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  11.2k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  11.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  11.2k|    break;
  |  |  ------------------
  |  |   63|  11.2k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 34, False: 50.3k]
  |  |  ------------------
  |  |   64|     34|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 50.3k]
  |  |  ------------------
  |  |   65|     46|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 12, False: 50.3k]
  |  |  ------------------
  |  |   66|     46|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     46|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     46|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  3.23k|  default:
  ------------------
  |  Branch (393:3): [True: 3.23k, False: 47.1k]
  ------------------
  394|  3.23k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.23k|#  define MINBPC(enc) 2
  ------------------
  395|  3.23k|    break;
  396|  50.3k|  }
  397|  1.36M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.36M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.36M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.36M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  72.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 72.2k, False: 1.28M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|      0|      LEAD_CASE(2)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 1.36M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  408|      0|      LEAD_CASE(3)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 1.36M]
  |  |  ------------------
  |  |  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|  40.9k|      LEAD_CASE(4)
  ------------------
  |  |  400|  40.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 40.9k, False: 1.32M]
  |  |  ------------------
  |  |  401|  40.9k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  40.9k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 33, False: 40.9k]
  |  |  ------------------
  |  |  402|     33|      *nextTokPtr = ptr;                                                       \
  |  |  403|     33|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     33|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     33|    }                                                                          \
  |  |  405|  40.9k|    ptr += n;                                                                  \
  |  |  406|  40.9k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     29|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 29, False: 1.36M]
  ------------------
  412|     29|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.36M]
  ------------------
  413|     38|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 9, False: 1.36M]
  ------------------
  414|  17.2k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 17.1k, False: 1.34M]
  ------------------
  415|  18.9k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.68k, False: 1.35M]
  ------------------
  416|  28.9k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 10.0k, False: 1.35M]
  ------------------
  417|  28.9k|      *nextTokPtr = ptr;
  418|  28.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  28.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.29M|    default:
  ------------------
  |  Branch (419:5): [True: 1.29M, False: 69.9k]
  ------------------
  420|  1.29M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.29M|#  define MINBPC(enc) 2
  ------------------
  421|  1.29M|      break;
  422|  1.36M|    }
  423|  1.36M|  }
  424|    130|  *nextTokPtr = ptr;
  425|    130|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    130|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  29.0k|}
xmltok.c:little2_attributeValueTok:
 1262|   195k|                          const char **nextTokPtr) {
 1263|   195k|  const char *start;
 1264|   195k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 3.57k, False: 192k]
  ------------------
 1265|  3.57k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.57k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   192k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   192k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   192k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   192k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 192k]
  ------------------
 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|   192k|  start = ptr;
 1275|  2.77M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  2.77M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.77M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.77M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   247k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 247k, False: 2.53M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|      0|      LEAD_CASE(2)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 2.77M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 2.77M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  60.2k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  60.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 60.2k, False: 2.71M]
  |  |  ------------------
  |  | 1279|  60.2k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  60.2k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   160k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 160k, False: 2.61M]
  ------------------
 1286|   160k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 83.8k, False: 76.5k]
  ------------------
 1287|  83.8k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  83.8k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  83.8k|#  define MINBPC(enc) 2
  ------------------
 1288|  76.5k|      *nextTokPtr = ptr;
 1289|  76.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  76.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 2.77M]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      1|      *nextTokPtr = ptr;
 1293|      1|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1294|  18.7k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 18.7k, False: 2.75M]
  ------------------
 1295|  18.7k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 9.44k, False: 9.31k]
  ------------------
 1296|  9.44k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  9.44k|#  define MINBPC(enc) 2
  ------------------
 1297|  9.44k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.44k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  9.44k|      }
 1299|  9.31k|      *nextTokPtr = ptr;
 1300|  9.31k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  9.31k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  7.52k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 7.52k, False: 2.77M]
  ------------------
 1302|  7.52k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 4.21k, False: 3.31k]
  ------------------
 1303|  4.21k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.21k|#  define MINBPC(enc) 2
  ------------------
 1304|  4.21k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.21k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.21k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.21k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 379, False: 3.83k]
  ------------------
 1305|    379|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    379|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  3.83k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  3.83k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.83k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.03k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.03k, False: 2.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 298, False: 3.53k]
  ------------------
 1307|    298|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    298|#  define MINBPC(enc) 2
  ------------------
 1308|  3.83k|        *nextTokPtr = ptr;
 1309|  3.83k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.83k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  4.21k|      }
 1311|  3.31k|      *nextTokPtr = ptr;
 1312|  3.31k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.31k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  3.30k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 3.30k, False: 2.77M]
  ------------------
 1314|  3.30k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 1.83k, False: 1.46k]
  ------------------
 1315|  1.83k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.83k|#  define MINBPC(enc) 2
  ------------------
 1316|  1.83k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  1.83k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  1.83k|      }
 1318|  1.46k|      *nextTokPtr = ptr;
 1319|  1.46k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.46k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  2.52M|    default:
  ------------------
  |  Branch (1320:5): [True: 2.52M, False: 250k]
  ------------------
 1321|  2.52M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.52M|#  define MINBPC(enc) 2
  ------------------
 1322|  2.52M|      break;
 1323|  2.77M|    }
 1324|  2.77M|  }
 1325|  2.38k|  *nextTokPtr = ptr;
 1326|  2.38k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.38k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   192k|}
xmltok.c:little2_entityValueTok:
 1331|  88.0k|                       const char **nextTokPtr) {
 1332|  88.0k|  const char *start;
 1333|  88.0k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.66k, False: 86.3k]
  ------------------
 1334|  1.66k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.66k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  86.3k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  86.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  86.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  86.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 86.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|  86.3k|  start = ptr;
 1344|  14.4M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  14.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  14.4M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  14.4M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   194k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 194k, False: 14.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 14.4M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1351|      0|      LEAD_CASE(3)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 14.4M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  99.0k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  99.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 99.0k, False: 14.3M]
  |  |  ------------------
  |  | 1348|  99.0k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  99.0k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  3.49k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 3.49k, False: 14.4M]
  ------------------
 1355|  3.49k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 2.07k, False: 1.41k]
  ------------------
 1356|  2.07k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.07k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.07k|#  define MINBPC(enc) 2
  ------------------
 1357|  1.41k|      *nextTokPtr = ptr;
 1358|  1.41k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.41k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      6|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 6, False: 14.4M]
  ------------------
 1360|      6|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 4, False: 2]
  ------------------
 1361|      4|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|      4|#  define PREFIX(ident) little2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|      4|#  define MINBPC(enc) 2
  ------------------
 1362|      4|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      4|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 3]
  ------------------
 1363|      4|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  11.9k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 11.9k, False: 14.4M]
  ------------------
 1367|  11.9k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 6.42k, False: 5.48k]
  ------------------
 1368|  6.42k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.42k|#  define MINBPC(enc) 2
  ------------------
 1369|  6.42k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.42k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  6.42k|      }
 1371|  5.48k|      *nextTokPtr = ptr;
 1372|  5.48k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.48k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  70.0k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 70.0k, False: 14.4M]
  ------------------
 1374|  70.0k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 36.0k, False: 34.0k]
  ------------------
 1375|  36.0k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  36.0k|#  define MINBPC(enc) 2
  ------------------
 1376|  36.0k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  36.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  36.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  36.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 566, False: 35.5k]
  ------------------
 1377|    566|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    566|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  35.5k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  35.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  35.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 13.0k, False: 22.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 532, False: 34.9k]
  ------------------
 1379|    532|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    532|#  define MINBPC(enc) 2
  ------------------
 1380|  35.5k|        *nextTokPtr = ptr;
 1381|  35.5k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  35.5k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  36.0k|      }
 1383|  34.0k|      *nextTokPtr = ptr;
 1384|  34.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  34.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  14.2M|    default:
  ------------------
  |  Branch (1385:5): [True: 14.2M, False: 184k]
  ------------------
 1386|  14.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  14.2M|#  define MINBPC(enc) 2
  ------------------
 1387|  14.2M|      break;
 1388|  14.4M|    }
 1389|  14.4M|  }
 1390|    866|  *nextTokPtr = ptr;
 1391|    866|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    866|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  86.3k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  19.6k|                         const char *end1, const char *ptr2) {
 1716|  19.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  19.6k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  76.9k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  57.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 66.1k, False: 10.8k]
  ------------------
 1718|  66.1k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|  66.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 26, False: 66.0k]
  ------------------
 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|     26|      return 0; /* LCOV_EXCL_LINE */
 1725|     26|    }
 1726|  66.0k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|  66.0k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  66.0k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 66.0k, False: 21]
  |  |  |  |  |  Branch (739:52): [True: 57.2k, False: 8.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  8.78k|      return 0;
 1728|  66.0k|  }
 1729|  10.8k|  return ptr1 == end1;
 1730|  19.6k|}
xmltok.c:little2_nameLength:
 1733|  14.5k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  14.5k|  const char *start = ptr;
 1735|  54.9k|  for (;;) {
 1736|  54.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  54.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  54.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 26.7k, False: 28.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 54.9k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1742|      0|      LEAD_CASE(3)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 54.9k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 54.9k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  28.1k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 28.1k, False: 26.7k]
  ------------------
 1746|  34.9k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 6.73k, False: 48.1k]
  ------------------
 1747|  34.9k|#  ifdef XML_NS
 1748|  34.9k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 54.9k]
  ------------------
 1749|  34.9k|#  endif
 1750|  40.1k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 5.22k, False: 49.6k]
  ------------------
 1751|  40.2k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 120, False: 54.7k]
  ------------------
 1752|  40.2k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 39, False: 54.8k]
  ------------------
 1753|  40.3k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 95, False: 54.8k]
  ------------------
 1754|  40.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  40.3k|#  define MINBPC(enc) 2
  ------------------
 1755|  40.3k|      break;
 1756|  14.5k|    default:
  ------------------
  |  Branch (1756:5): [True: 14.5k, False: 40.3k]
  ------------------
 1757|  14.5k|      return (int)(ptr - start);
 1758|  54.9k|    }
 1759|  54.9k|  }
 1760|  14.5k|}
xmltok.c:little2_getAtts:
 1510|  10.5k|                ATTRIBUTE *atts) {
 1511|  10.5k|  enum { other, inName, inValue } state = inName;
 1512|  10.5k|  int nAtts = 0;
 1513|  10.5k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  9.57M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  10.5k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  9.56M|#  define MINBPC(enc) 2
  ------------------
 1517|  9.57M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.57M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.57M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.20M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.20M, False: 5.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.57M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.57M]
  |  |  ------------------
  |  | 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|   101k|      LEAD_CASE(4)
  ------------------
  |  | 1527|   101k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 101k, False: 9.47M]
  |  |  ------------------
  |  | 1528|   101k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   101k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 101k]
  |  |  |  |  ------------------
  |  |  |  | 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|   101k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|   101k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  5.26M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 5.26M, False: 4.30M]
  ------------------
 1535|  5.75M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 485k, False: 9.08M]
  ------------------
 1536|  5.95M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 198k, False: 9.37M]
  ------------------
 1537|  5.95M|      START_NAME
  ------------------
  |  | 1519|  5.95M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 452k, False: 5.50M]
  |  |  ------------------
  |  | 1520|   452k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 228k, False: 223k]
  |  |  ------------------
  |  | 1521|   228k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   228k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   228k|      }                                                                        \
  |  | 1524|   452k|      state = inName;                                                          \
  |  | 1525|   452k|    }
  ------------------
 1538|  5.95M|      break;
 1539|      0|#  undef START_NAME
 1540|  9.47k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 9.47k, False: 9.56M]
  ------------------
 1541|  9.47k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 3.93k, False: 5.53k]
  ------------------
 1542|  3.93k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 2.59k, False: 1.34k]
  ------------------
 1543|  2.59k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.59k|#  define MINBPC(enc) 2
  ------------------
 1544|  3.93k|        state = inValue;
 1545|  3.93k|        open = BT_QUOT;
 1546|  5.53k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 3.93k, False: 1.60k]
  ------------------
 1547|  3.93k|        state = other;
 1548|  3.93k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 2.59k, False: 1.34k]
  ------------------
 1549|  2.59k|          atts[nAtts].valueEnd = ptr;
 1550|  3.93k|        nAtts++;
 1551|  3.93k|      }
 1552|  9.47k|      break;
 1553|   896k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 896k, False: 8.67M]
  ------------------
 1554|   896k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 448k, False: 448k]
  ------------------
 1555|   448k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 225k, False: 222k]
  ------------------
 1556|   225k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   225k|#  define MINBPC(enc) 2
  ------------------
 1557|   448k|        state = inValue;
 1558|   448k|        open = BT_APOS;
 1559|   448k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 448k, False: 324]
  ------------------
 1560|   448k|        state = other;
 1561|   448k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 225k, False: 222k]
  ------------------
 1562|   225k|          atts[nAtts].valueEnd = ptr;
 1563|   448k|        nAtts++;
 1564|   448k|      }
 1565|   896k|      break;
 1566|  81.7k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 81.7k, False: 9.49M]
  ------------------
 1567|  81.7k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 81.5k, False: 228]
  ------------------
 1568|  81.5k|        atts[nAtts].normalized = 0;
 1569|  81.7k|      break;
 1570|  1.23M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.23M, False: 8.34M]
  ------------------
 1571|  1.23M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.60k, False: 1.22M]
  ------------------
 1572|  2.60k|        state = other;
 1573|  1.22M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 781k, False: 447k]
  |  Branch (1573:36): [True: 393k, False: 388k]
  |  Branch (1573:55): [True: 196k, False: 197k]
  ------------------
 1574|  1.22M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 35.7k, False: 160k]
  ------------------
 1575|   196k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   160k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   160k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 160k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   356k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 7.19k, False: 153k]
  ------------------
 1576|   196k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|   153k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   153k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 146k, False: 6.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   349k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 81.5k, False: 71.5k]
  ------------------
 1577|   196k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  71.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  71.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  65.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 65.3k, False: 6.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 65.2k, False: 6.31k]
  ------------------
 1578|   189k|        atts[nAtts].normalized = 0;
 1579|  1.23M|      break;
 1580|   169k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 169k, False: 9.40M]
  ------------------
 1581|   185k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 16.2k, False: 9.55M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   185k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 1.50k, False: 184k]
  ------------------
 1585|  1.50k|        state = other;
 1586|   184k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 177k, False: 6.62k]
  |  Branch (1586:36): [True: 95.8k, False: 81.7k]
  ------------------
 1587|  95.8k|        atts[nAtts].normalized = 0;
 1588|   185k|      break;
 1589|   200k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 200k, False: 9.37M]
  ------------------
 1590|   246k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 45.6k, False: 9.52M]
  ------------------
 1591|   246k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 10.5k, False: 235k]
  ------------------
 1592|  10.5k|        return nAtts;
 1593|   235k|      break;
 1594|   867k|    default:
  ------------------
  |  Branch (1594:5): [True: 867k, False: 8.70M]
  ------------------
 1595|   867k|      break;
 1596|  9.57M|    }
 1597|  9.57M|  }
 1598|       |  /* not reached */
 1599|  10.5k|}
xmltok.c:little2_charRefNumber:
 1602|  6.27k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  6.27k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  6.27k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.27k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  6.27k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  6.27k|#  define MINBPC(enc) 2
  ------------------
 1607|  6.27k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  6.27k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.27k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.27k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 4.97k, False: 1.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  23.5k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  4.97k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  23.5k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  23.5k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 23.5k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 4.95k, False: 18.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  18.5k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  18.5k|#  define MINBPC(enc) 2
  ------------------
 1610|  18.5k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  18.5k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  18.5k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 18.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  18.5k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 18.5k]
  ------------------
 1612|    590|      case ASCII_0:
  ------------------
  |  |   90|    590|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 590, False: 17.9k]
  ------------------
 1613|  1.37k|      case ASCII_1:
  ------------------
  |  |   91|  1.37k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 785, False: 17.7k]
  ------------------
 1614|  2.17k|      case ASCII_2:
  ------------------
  |  |   92|  2.17k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 795, False: 17.7k]
  ------------------
 1615|  2.75k|      case ASCII_3:
  ------------------
  |  |   93|  2.75k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 580, False: 17.9k]
  ------------------
 1616|  3.70k|      case ASCII_4:
  ------------------
  |  |   94|  3.70k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 951, False: 17.6k]
  ------------------
 1617|  5.84k|      case ASCII_5:
  ------------------
  |  |   95|  5.84k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 2.14k, False: 16.4k]
  ------------------
 1618|  6.27k|      case ASCII_6:
  ------------------
  |  |   96|  6.27k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 433, False: 18.1k]
  ------------------
 1619|  6.75k|      case ASCII_7:
  ------------------
  |  |   97|  6.75k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 485, False: 18.0k]
  ------------------
 1620|  7.49k|      case ASCII_8:
  ------------------
  |  |   98|  7.49k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 734, False: 17.8k]
  ------------------
 1621|  8.68k|      case ASCII_9:
  ------------------
  |  |   99|  8.68k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 1.18k, False: 17.3k]
  ------------------
 1622|  8.68k|        result <<= 4;
 1623|  8.68k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  8.68k|#define ASCII_0 0x30
  ------------------
 1624|  8.68k|        break;
 1625|    210|      case ASCII_A:
  ------------------
  |  |   36|    210|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 210, False: 18.3k]
  ------------------
 1626|    670|      case ASCII_B:
  ------------------
  |  |   37|    670|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 460, False: 18.0k]
  ------------------
 1627|  1.27k|      case ASCII_C:
  ------------------
  |  |   38|  1.27k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 600, False: 17.9k]
  ------------------
 1628|  2.31k|      case ASCII_D:
  ------------------
  |  |   39|  2.31k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 1.04k, False: 17.5k]
  ------------------
 1629|  3.47k|      case ASCII_E:
  ------------------
  |  |   40|  3.47k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 1.15k, False: 17.4k]
  ------------------
 1630|  6.87k|      case ASCII_F:
  ------------------
  |  |   41|  6.87k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 3.40k, False: 15.1k]
  ------------------
 1631|  6.87k|        result <<= 4;
 1632|  6.87k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  6.87k|#define ASCII_A 0x41
  ------------------
 1633|  6.87k|        break;
 1634|    389|      case ASCII_a:
  ------------------
  |  |   63|    389|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 389, False: 18.1k]
  ------------------
 1635|    514|      case ASCII_b:
  ------------------
  |  |   64|    514|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 125, False: 18.4k]
  ------------------
 1636|    709|      case ASCII_c:
  ------------------
  |  |   65|    709|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 195, False: 18.3k]
  ------------------
 1637|    796|      case ASCII_d:
  ------------------
  |  |   66|    796|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 87, False: 18.4k]
  ------------------
 1638|    994|      case ASCII_e:
  ------------------
  |  |   67|    994|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 198, False: 18.3k]
  ------------------
 1639|  3.00k|      case ASCII_f:
  ------------------
  |  |   68|  3.00k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 2.00k, False: 16.5k]
  ------------------
 1640|  3.00k|        result <<= 4;
 1641|  3.00k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.00k|#define ASCII_a 0x61
  ------------------
 1642|  3.00k|        break;
 1643|  18.5k|      }
 1644|  18.5k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 15, False: 18.5k]
  ------------------
 1645|     15|        return -1;
 1646|  18.5k|    }
 1647|  4.97k|  } else {
 1648|  6.09k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  6.09k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.09k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.09k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1.29k, False: 4.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.79k|#  define MINBPC(enc) 2
  ------------------
 1649|  4.80k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  4.80k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  4.80k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 4.80k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  4.80k|      result *= 10;
 1651|  4.80k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  4.80k|#define ASCII_0 0x30
  ------------------
 1652|  4.80k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 3, False: 4.79k]
  ------------------
 1653|      3|        return -1;
 1654|  4.80k|    }
 1655|  1.29k|  }
 1656|  6.25k|  return checkCharRefNumber(result);
 1657|  6.27k|}
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: 85.3k, False: 18.0k]
  ------------------
 1664|  2.07k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 2.07k, False: 101k]
  ------------------
 1665|  2.07k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  2.07k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.07k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.67k, False: 405]
  |  |  |  |  |  Branch (739:52): [True: 775, False: 898]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    775|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    775|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    775|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 236, False: 539]
  |  |  |  |  |  Branch (738:35): [True: 558, False: 217]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    536|      case ASCII_l:
  ------------------
  |  |   74|    536|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 536, False: 239]
  ------------------
 1668|    536|        return ASCII_LT;
  ------------------
  |  |  111|    536|#define ASCII_LT 0x3C
  ------------------
 1669|      3|      case ASCII_g:
  ------------------
  |  |   69|      3|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 3, False: 772]
  ------------------
 1670|      3|        return ASCII_GT;
  ------------------
  |  |  113|      3|#define ASCII_GT 0x3E
  ------------------
 1671|    775|      }
 1672|    775|    }
 1673|  1.53k|    break;
 1674|  8.40k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 8.40k, False: 95.0k]
  ------------------
 1675|  8.40k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  8.40k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  8.40k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 8.17k, False: 233]
  |  |  |  |  |  Branch (739:52): [True: 7.70k, False: 468]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  7.70k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.70k|#  define MINBPC(enc) 2
  ------------------
 1677|  7.70k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  7.70k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  7.70k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 7.41k, False: 288]
  |  |  |  |  |  Branch (739:52): [True: 5.98k, False: 1.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|  5.98k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.98k|#  define MINBPC(enc) 2
  ------------------
 1679|  5.98k|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|  5.98k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.98k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.18k, False: 805]
  |  |  |  |  |  Branch (739:52): [True: 67, False: 5.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|     67|          return ASCII_AMP;
  ------------------
  |  |  105|     67|#define ASCII_AMP 0x26
  ------------------
 1681|  5.98k|      }
 1682|  7.70k|    }
 1683|  8.34k|    break;
 1684|  8.34k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 7.59k, False: 95.8k]
  ------------------
 1685|  7.59k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  7.59k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  7.59k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 590, False: 7.00k]
  |  |  |  |  |  Branch (738:35): [True: 7.16k, False: 432]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|    971|    case ASCII_q:
  ------------------
  |  |   79|    971|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 971, False: 6.62k]
  ------------------
 1687|    971|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    971|#  define MINBPC(enc) 2
  ------------------
 1688|    971|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|    971|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    971|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 775, False: 196]
  |  |  |  |  |  Branch (739:52): [True: 695, False: 80]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|    695|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    695|#  define MINBPC(enc) 2
  ------------------
 1690|    695|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|    695|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    695|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 628, False: 67]
  |  |  |  |  |  Branch (739:52): [True: 430, False: 198]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    430|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    430|#  define MINBPC(enc) 2
  ------------------
 1692|    430|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    430|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    430|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 357, False: 73]
  |  |  |  |  |  Branch (739:52): [True: 280, False: 77]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    280|            return ASCII_QUOT;
  ------------------
  |  |  104|    280|#define ASCII_QUOT 0x22
  ------------------
 1694|    430|        }
 1695|    695|      }
 1696|    691|      break;
 1697|  6.03k|    case ASCII_a:
  ------------------
  |  |   63|  6.03k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 6.03k, False: 1.56k]
  ------------------
 1698|  6.03k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.03k|#  define MINBPC(enc) 2
  ------------------
 1699|  6.03k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  6.03k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.03k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.84k, False: 185]
  |  |  |  |  |  Branch (739:52): [True: 2.84k, False: 3.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  2.84k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.84k|#  define MINBPC(enc) 2
  ------------------
 1701|  2.84k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  2.84k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.84k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.01k, False: 834]
  |  |  |  |  |  Branch (739:52): [True: 1.72k, False: 286]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  1.72k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.72k|#  define MINBPC(enc) 2
  ------------------
 1703|  1.72k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|  1.72k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.72k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.26k, False: 463]
  |  |  |  |  |  Branch (739:52): [True: 209, False: 1.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    209|            return ASCII_APOS;
  ------------------
  |  |  106|    209|#define ASCII_APOS 0x27
  ------------------
 1705|  1.72k|        }
 1706|  2.84k|      }
 1707|  5.82k|      break;
 1708|  7.59k|    }
 1709|   103k|  }
 1710|   102k|  return 0;
 1711|   103k|}
xmltok.c:little2_updatePosition:
 1779|  2.84k|                       POSITION *pos) {
 1780|  1.57M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  1.57M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.57M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.57M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   255k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 255k, False: 1.32M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 1.57M]
  |  |  ------------------
  |  | 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: 1.57M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  59.3k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  59.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 59.3k, False: 1.51M]
  |  |  ------------------
  |  | 1784|  59.3k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  59.3k|    pos->columnNumber++;                                                       \
  |  | 1786|  59.3k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  6.68k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 6.68k, False: 1.57M]
  ------------------
 1792|  6.68k|      pos->columnNumber = 0;
 1793|  6.68k|      pos->lineNumber++;
 1794|  6.68k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.68k|#  define MINBPC(enc) 2
  ------------------
 1795|  6.68k|      break;
 1796|  22.5k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 22.5k, False: 1.55M]
  ------------------
 1797|  22.5k|      pos->lineNumber++;
 1798|  22.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  22.5k|#  define MINBPC(enc) 2
  ------------------
 1799|  22.5k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  22.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  45.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  22.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 22.5k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  22.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  22.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.91k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.91k, False: 14.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.01k, False: 21.5k]
  ------------------
 1800|  1.01k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.01k|#  define MINBPC(enc) 2
  ------------------
 1801|  22.5k|      pos->columnNumber = 0;
 1802|  22.5k|      break;
 1803|  1.48M|    default:
  ------------------
  |  Branch (1803:5): [True: 1.48M, False: 88.6k]
  ------------------
 1804|  1.48M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.48M|#  define MINBPC(enc) 2
  ------------------
 1805|  1.48M|      pos->columnNumber++;
 1806|  1.48M|      break;
 1807|  1.57M|    }
 1808|  1.57M|  }
 1809|  2.84k|}
xmltok.c:little2_isPublicId:
 1450|    695|                   const char **badPtr) {
 1451|    695|  ptr += MINBPC(enc);
  ------------------
  |  |  783|    695|#  define MINBPC(enc) 2
  ------------------
 1452|    695|  end -= MINBPC(enc);
  ------------------
  |  |  783|    695|#  define MINBPC(enc) 2
  ------------------
 1453|  13.1k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  13.0k|#  define MINBPC(enc) 2
  ------------------
 1454|  13.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 13.1k, False: 43]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    757|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 757, False: 12.4k]
  ------------------
 1456|  2.42k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 1.66k, False: 11.4k]
  ------------------
 1457|  2.92k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 496, False: 12.6k]
  ------------------
 1458|  3.23k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 310, False: 12.8k]
  ------------------
 1459|  3.49k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 262, False: 12.8k]
  ------------------
 1460|  3.71k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 225, False: 12.9k]
  ------------------
 1461|  4.08k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 361, False: 12.7k]
  ------------------
 1462|  4.41k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 330, False: 12.8k]
  ------------------
 1463|  4.61k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 203, False: 12.9k]
  ------------------
 1464|  4.89k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 285, False: 12.8k]
  ------------------
 1465|  5.49k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 593, False: 12.5k]
  ------------------
 1466|  5.83k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 345, False: 12.8k]
  ------------------
 1467|  6.25k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 416, False: 12.7k]
  ------------------
 1468|  6.46k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 210, False: 12.9k]
  ------------------
 1469|  6.91k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 450, False: 12.7k]
  ------------------
 1470|  7.35k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 442, False: 12.7k]
  ------------------
 1471|  7.63k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 277, False: 12.8k]
  ------------------
 1472|  8.06k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 438, False: 12.7k]
  ------------------
 1473|  8.06k|#  ifdef XML_NS
 1474|  8.06k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 13.1k]
  ------------------
 1475|  8.06k|#  endif
 1476|  8.06k|      break;
 1477|  1.16k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 1.16k, False: 11.9k]
  ------------------
 1478|  1.16k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|  1.16k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.16k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.16k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|  1.16k|      break;
 1483|  1.16k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 314, False: 12.8k]
  ------------------
 1484|  3.14k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 2.82k, False: 10.3k]
  ------------------
 1485|  3.14k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|  3.14k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.14k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 3.14k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 3.13k, False: 9]
  ------------------
 1486|  3.13k|        break;
 1487|       |      /* fall through */
 1488|    796|    default:
  ------------------
  |  Branch (1488:5): [True: 787, False: 12.3k]
  ------------------
 1489|    796|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    796|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    796|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 753, False: 43]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    361|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 361, False: 435]
  ------------------
 1491|    737|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 376, False: 420]
  ------------------
 1492|    737|        break;
 1493|     59|      default:
  ------------------
  |  Branch (1493:7): [True: 59, False: 737]
  ------------------
 1494|     59|        *badPtr = ptr;
 1495|     59|        return 0;
 1496|    796|      }
 1497|    737|      break;
 1498|  13.1k|    }
 1499|  13.1k|  }
 1500|    635|  return 1;
 1501|    695|}
xmltok.c:big2_prologTok:
 1018|  77.0k|                  const char **nextTokPtr) {
 1019|  77.0k|  int tok;
 1020|  77.0k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 170, False: 76.8k]
  ------------------
 1021|    170|    return XML_TOK_NONE;
  ------------------
  |  |   51|    170|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  76.8k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  76.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  76.8k|    size_t n = end - ptr;
 1024|  76.8k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  76.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 31.1k, False: 45.6k]
  ------------------
 1025|  31.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  31.1k|#  define MINBPC(enc) 2
  ------------------
 1026|  31.1k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 45, False: 31.1k]
  ------------------
 1027|     45|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  31.1k|      end = ptr + n;
 1029|  31.1k|    }
 1030|  76.8k|  }
 1031|  76.8k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  76.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  76.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  74.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 74.7k, False: 2.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.83k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.83k, False: 75.0k]
  ------------------
 1033|  1.83k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.83k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.83k|#  define MINBPC(enc) 2
  ------------------
 1034|  2.16k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 2.16k, False: 74.6k]
  ------------------
 1035|  2.16k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.16k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.16k|#  define MINBPC(enc) 2
  ------------------
 1036|  11.3k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 11.3k, False: 65.5k]
  ------------------
 1037|  11.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  11.3k|#  define MINBPC(enc) 2
  ------------------
 1038|  11.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.3k|    {                                                                          \
  |  |  |  |  135|  11.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  11.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 11.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|  11.3k|    }
  |  |  ------------------
  ------------------
 1039|  11.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  11.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  11.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 15, False: 11.3k]
  |  |  |  |  |  Branch (870:4): [True: 10.0k, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  5.71k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 5.71k, False: 5.61k]
  ------------------
 1041|  5.71k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.71k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.71k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.16k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.16k, False: 9.15k]
  ------------------
 1043|  2.16k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.16k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.16k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.15k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.15k, False: 10.1k]
  ------------------
 1045|  2.14k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 995, False: 10.3k]
  ------------------
 1046|  3.41k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.27k, False: 10.0k]
  ------------------
 1047|  3.41k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 11.3k]
  ------------------
 1048|  3.41k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 11.3k]
  ------------------
 1049|  3.43k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 13, False: 11.3k]
  ------------------
 1050|  3.43k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  3.43k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.43k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.43k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  11.3k|    }
 1053|     15|    *nextTokPtr = ptr;
 1054|     15|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
 1055|  11.3k|  }
 1056|  5.64k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 5.64k, False: 71.1k]
  ------------------
 1057|  5.64k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  5.64k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 47, False: 5.60k]
  ------------------
 1058|     47|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     47|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     47|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     47|    }
 1062|       |    /* fall through */
 1063|  14.7k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 9.17k, False: 67.6k]
  ------------------
 1064|  19.6k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 4.86k, False: 71.9k]
  ------------------
 1065|  21.6k|    for (;;) {
 1066|  21.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  21.6k|#  define MINBPC(enc) 2
  ------------------
 1067|  21.6k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  21.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  21.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  21.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 100, False: 21.5k]
  ------------------
 1068|    100|        break;
 1069|  21.5k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  21.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  21.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  20.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 20.2k, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|    636|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 636, False: 20.8k]
  ------------------
 1071|  1.60k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 968, False: 20.5k]
  ------------------
 1072|  1.60k|        break;
 1073|    387|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 387, False: 21.1k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    387|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    387|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 383, False: 4]
  ------------------
 1076|    383|          break;
 1077|       |        /* fall through */
 1078|  19.5k|      default:
  ------------------
  |  Branch (1078:7): [True: 19.5k, False: 1.99k]
  ------------------
 1079|  19.5k|        *nextTokPtr = ptr;
 1080|  19.5k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  19.5k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  21.5k|      }
 1082|  21.5k|    }
 1083|    100|    *nextTokPtr = ptr;
 1084|    100|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    100|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  1.65k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 1.65k, False: 75.1k]
  ------------------
 1086|  1.65k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.65k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.65k|#  define MINBPC(enc) 2
  ------------------
 1087|    989|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 989, False: 75.8k]
  ------------------
 1088|    989|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    989|#  define MINBPC(enc) 2
  ------------------
 1089|    989|    return XML_TOK_COMMA;
  ------------------
  |  |  107|    989|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.13k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.13k, False: 75.7k]
  ------------------
 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|    690|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 690, False: 76.1k]
  ------------------
 1094|    690|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    690|#  define MINBPC(enc) 2
  ------------------
 1095|    690|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    690|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    690|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    690|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 3, False: 687]
  ------------------
 1096|      3|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      3|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    687|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    687|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    687|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 684, False: 3]
  |  |  |  |  |  Branch (872:49): [True: 31, False: 653]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     31|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     31|    {                                                                          \
  |  |  135|     31|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     31|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     31|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 30]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     31|    }
  ------------------
 1099|     30|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     30|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     30|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 19, False: 11]
  |  |  |  |  |  Branch (872:49): [True: 3, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      3|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      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|     30|    }
 1104|    683|    *nextTokPtr = ptr;
 1105|    683|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    683|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  6.27k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 6.27k, False: 70.5k]
  ------------------
 1107|  6.27k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.27k|#  define MINBPC(enc) 2
  ------------------
 1108|  6.27k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  6.27k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  5.25k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 5.25k, False: 71.5k]
  ------------------
 1110|  5.25k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.25k|#  define MINBPC(enc) 2
  ------------------
 1111|  5.25k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.25k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.25k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.25k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 4, False: 5.24k]
  ------------------
 1112|      4|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      4|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  5.24k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.24k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.24k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.22k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 27, False: 5.22k]
  |  |  |  |  |  Branch (870:4): [True: 5.22k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    270|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 270, False: 4.97k]
  ------------------
 1115|    270|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    270|#  define MINBPC(enc) 2
  ------------------
 1116|    270|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    270|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    131|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 131, False: 5.11k]
  ------------------
 1118|    131|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    131|#  define MINBPC(enc) 2
  ------------------
 1119|    131|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    131|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    325|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 325, False: 4.92k]
  ------------------
 1121|    325|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    325|#  define MINBPC(enc) 2
  ------------------
 1122|    325|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    325|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    360|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 360, False: 4.88k]
  ------------------
 1124|    873|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 513, False: 4.73k]
  ------------------
 1125|  1.53k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 665, False: 4.58k]
  ------------------
 1126|  2.35k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 813, False: 4.43k]
  ------------------
 1127|  2.74k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 389, False: 4.85k]
  ------------------
 1128|  3.47k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 736, False: 4.51k]
  ------------------
 1129|  4.49k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.01k, False: 4.22k]
  ------------------
 1130|  4.49k|      *nextTokPtr = ptr;
 1131|  4.49k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  4.49k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  5.24k|    }
 1133|     27|    *nextTokPtr = ptr;
 1134|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
 1135|  5.42k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 5.42k, False: 71.4k]
  ------------------
 1136|  5.42k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.42k|#  define MINBPC(enc) 2
  ------------------
 1137|  5.42k|    return XML_TOK_OR;
  ------------------
  |  |   88|  5.42k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  3.88k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 3.88k, False: 72.9k]
  ------------------
 1139|  3.88k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.88k|#  define MINBPC(enc) 2
  ------------------
 1140|  3.88k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  3.88k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|    540|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 540, False: 76.3k]
  ------------------
 1142|    540|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    540|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    540|#  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: 76.8k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  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: 76.8k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  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|     51|    LEAD_CASE(4)
  ------------------
  |  | 1144|     11|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 18, False: 76.8k]
  |  |  ------------------
  |  | 1145|     18|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 7, False: 11]
  |  |  ------------------
  |  | 1146|     11|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      7|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     11|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     11|#    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|     11|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     11|#  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|     11|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     11|#  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|     11|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     11|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  7.28k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 7.28k, False: 69.5k]
  ------------------
 1168|  13.2k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 6.01k, False: 70.8k]
  ------------------
 1169|  13.2k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  13.2k|#define XML_TOK_NAME 18
  ------------------
 1170|  13.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.2k|#  define MINBPC(enc) 2
  ------------------
 1171|  13.2k|    break;
 1172|    209|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 209, False: 76.6k]
  ------------------
 1173|    283|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 74, False: 76.7k]
  ------------------
 1174|    585|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 302, False: 76.5k]
  ------------------
 1175|    585|#  ifdef XML_NS
 1176|    585|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 76.8k]
  ------------------
 1177|    585|#  endif
 1178|    585|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    585|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    585|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    585|#  define MINBPC(enc) 2
  ------------------
 1180|    585|    break;
 1181|  2.03k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.03k, False: 74.8k]
  ------------------
 1182|  2.03k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  2.03k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  2.03k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.03k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.57k, False: 458]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.57k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.57k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.57k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.57k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.57k|      break;
 1186|  1.57k|    }
 1187|    458|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    458|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    458|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    458|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 404, False: 54]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    404|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    404|#  define MINBPC(enc) 2
  ------------------
 1189|    404|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    404|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    404|      break;
 1191|    404|    }
 1192|       |    /* fall through */
 1193|    100|  default:
  ------------------
  |  Branch (1193:3): [True: 46, False: 76.7k]
  ------------------
 1194|    100|    *nextTokPtr = ptr;
 1195|    100|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    100|#define XML_TOK_INVALID 0
  ------------------
 1196|  76.8k|  }
 1197|  30.7k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  30.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  30.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  30.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 27.2k, False: 3.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  57.2k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  15.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 3.46k, False: 27.3k]
  |  |  ------------------
  |  |   82|  15.0k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  3.46k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  3.46k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.46k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 41, False: 3.42k]
  |  |  ------------------
  |  |   83|     41|      *nextTokPtr = ptr;                                                       \
  |  |   84|     41|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     41|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     41|    }                                                                          \
  |  |   86|  15.0k|    /* fall through */                                                         \
  |  |   87|  15.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 7.01k, False: 23.7k]
  |  |  ------------------
  |  |   88|  14.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.59k, False: 27.1k]
  |  |  ------------------
  |  |   89|  14.5k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 492, False: 30.2k]
  |  |  ------------------
  |  |   90|  14.7k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 221, False: 30.5k]
  |  |  ------------------
  |  |   91|  15.0k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 277, False: 30.4k]
  |  |  ------------------
  |  |   92|  15.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  15.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  15.0k|    break;                                                                     \
  |  |   94|  15.0k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 30.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 30.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 30.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     18|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|     70|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 70, False: 30.7k]
  ------------------
 1201|  1.72k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.65k, False: 29.1k]
  ------------------
 1202|  1.89k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 166, False: 30.6k]
  ------------------
 1203|  3.37k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.47k, False: 29.2k]
  ------------------
 1204|  4.37k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 1.00k, False: 29.7k]
  ------------------
 1205|  4.37k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 1, False: 30.7k]
  ------------------
 1206|  8.44k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 4.06k, False: 26.7k]
  ------------------
 1207|  10.0k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.55k, False: 29.2k]
  ------------------
 1208|  11.9k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 1.91k, False: 28.8k]
  ------------------
 1209|  11.9k|      *nextTokPtr = ptr;
 1210|  11.9k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 30.7k]
  ------------------
 1213|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
 1214|      0|      switch (tok) {
  ------------------
  |  Branch (1214:15): [True: 0, False: 0]
  ------------------
 1215|      0|      case XML_TOK_NAME:
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
 1217|      0|        tok = XML_TOK_PREFIXED_NAME;
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
 1218|      0|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1219|      0|          CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|      0|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|      0|    /* fall through */                                                         \
  |  |   87|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   89|      0|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   90|      0|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|      0|    break;                                                                     \
  |  |   94|      0|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      0|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1220|      0|        default:
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|          tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1222|      0|          break;
 1223|      0|        }
 1224|      0|        break;
 1225|      0|      case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1225:7): [True: 0, False: 0]
  ------------------
 1226|      0|        tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1227|      0|        break;
 1228|      0|      }
 1229|      0|      break;
 1230|      0|#  endif
 1231|    957|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 957, False: 29.8k]
  ------------------
 1232|    957|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    957|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 956]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    956|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    956|#  define MINBPC(enc) 2
  ------------------
 1237|    956|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    956|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|  2.75k|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 2.75k, False: 28.0k]
  ------------------
 1239|  2.75k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  2.75k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 2.75k]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|  2.75k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.75k|#  define MINBPC(enc) 2
  ------------------
 1244|  2.75k|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|  2.75k|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|     35|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 35, False: 30.7k]
  ------------------
 1246|     35|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     35|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 34]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|     34|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     34|#  define MINBPC(enc) 2
  ------------------
 1251|     34|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|     34|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     24|    default:
  ------------------
  |  Branch (1252:5): [True: 24, False: 30.7k]
  ------------------
 1253|     24|      *nextTokPtr = ptr;
 1254|     24|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
 1255|  30.7k|    }
 1256|  30.7k|  }
 1257|    115|  return -tok;
 1258|  15.8k|}
xmltok.c:big2_scanLit:
  984|  4.00k|                const char **nextTokPtr) {
  985|  25.2M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  25.2M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  25.2M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  25.2M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   173k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 173k, False: 25.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  25.2M|    switch (t) {
  988|  70.6k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 25.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 25.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  35.3k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  35.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 35.3k, False: 25.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|  35.3k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 26, False: 35.3k]
  |  |  |  |  ------------------
  |  |  |  |   51|  35.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     26|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  35.3k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  35.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|  35.3k|    ptr += n;                                                                  \
  |  |  |  |   57|  35.3k|    break;
  |  |  ------------------
  |  |   63|  35.3k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 25.2M]
  |  |  ------------------
  |  |   64|      9|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 25.2M]
  |  |  ------------------
  |  |   65|     13|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 25.2M]
  |  |  ------------------
  |  |   66|     13|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  3.72k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 3.72k, False: 25.2M]
  ------------------
  990|  6.40k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 2.68k, False: 25.2M]
  ------------------
  991|  6.40k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.40k|#  define MINBPC(enc) 2
  ------------------
  992|  6.40k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 2.50k, False: 3.90k]
  ------------------
  993|  2.50k|        break;
  994|  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)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  3.90k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 2, False: 3.90k]
  ------------------
  995|      2|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      2|#define XML_TOK_LITERAL 27
  ------------------
  996|  3.90k|      *nextTokPtr = ptr;
  997|  3.90k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.90k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.90k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.88k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.88k, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|    407|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 407, False: 3.50k]
  ------------------
  999|  1.23k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 823, False: 3.08k]
  ------------------
 1000|  2.29k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.06k, False: 2.84k]
  ------------------
 1001|  3.86k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 1.57k, False: 2.33k]
  ------------------
 1002|  3.87k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 7, False: 3.90k]
  ------------------
 1003|  3.88k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 13, False: 3.89k]
  ------------------
 1004|  3.88k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  3.88k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     24|      default:
  ------------------
  |  Branch (1005:7): [True: 24, False: 3.88k]
  ------------------
 1006|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
 1007|  3.90k|      }
 1008|  25.1M|    default:
  ------------------
  |  Branch (1008:5): [True: 25.1M, False: 41.7k]
  ------------------
 1009|  25.1M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  25.1M|#  define MINBPC(enc) 2
  ------------------
 1010|  25.1M|      break;
 1011|  25.2M|    }
 1012|  25.2M|  }
 1013|     55|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     55|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  4.00k|}
xmltok.c:big2_scanDecl:
  183|  5.71k|                 const char **nextTokPtr) {
  184|  5.71k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.71k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.71k|    {                                                                          \
  |  |  |  |  135|  5.71k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.71k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.71k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 5.70k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  5.71k|    }
  |  |  ------------------
  ------------------
  185|  5.70k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.70k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.70k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.68k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.68k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    691|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 691, False: 5.01k]
  ------------------
  187|    691|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    691|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    691|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 5.70k]
  ------------------
  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|    133|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 133, False: 5.57k]
  ------------------
  192|  4.99k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 4.86k, False: 846]
  ------------------
  193|  4.99k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.99k|#  define MINBPC(enc) 2
  ------------------
  194|  4.99k|    break;
  195|     21|  default:
  ------------------
  |  Branch (195:3): [True: 21, False: 5.68k]
  ------------------
  196|     21|    *nextTokPtr = ptr;
  197|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  198|  5.70k|  }
  199|  33.0k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  33.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  33.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  33.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  33.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 33.0k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     31|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 31, False: 33.0k]
  ------------------
  202|     31|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     31|    {                                                                          \
  |  |  135|     31|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     31|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     31|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 29]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     31|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     29|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     29|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     29|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      6|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 25, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 6, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 28]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 28]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 28]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 28]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     29|      }
  212|       |      /* fall through */
  213|  3.25k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 3.22k, False: 29.8k]
  ------------------
  214|  4.24k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 996, False: 32.0k]
  ------------------
  215|  4.93k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 684, False: 32.3k]
  ------------------
  216|  4.93k|      *nextTokPtr = ptr;
  217|  4.93k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  4.93k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  22.7k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 22.7k, False: 10.3k]
  ------------------
  219|  28.0k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 5.35k, False: 27.7k]
  ------------------
  220|  28.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  28.0k|#  define MINBPC(enc) 2
  ------------------
  221|  28.0k|      break;
  222|     35|    default:
  ------------------
  |  Branch (222:5): [True: 35, False: 33.0k]
  ------------------
  223|     35|      *nextTokPtr = ptr;
  224|     35|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  225|  33.0k|    }
  226|  33.0k|  }
  227|     21|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  4.99k|}
xmltok.c:big2_scanComment:
  146|  1.02k|                    const char **nextTokPtr) {
  147|  1.02k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.02k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  1.02k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.01k, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.01k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.01k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.01k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.00k, False: 10]
  |  |  |  |  |  Branch (872:49): [True: 999, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     17|      *nextTokPtr = ptr;
  150|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  151|     17|    }
  152|    999|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    999|#  define MINBPC(enc) 2
  ------------------
  153|  1.22M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  1.22M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.22M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.22M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 22.2k, False: 1.20M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  22.3k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 1.22M]
  |  |  |  |  ------------------
  |  |  |  |   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: 1.22M]
  |  |  |  |  ------------------
  |  |  |  |   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|  11.1k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  11.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 11.1k, False: 1.21M]
  |  |  |  |  ------------------
  |  |  |  |   50|  11.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 11.1k]
  |  |  |  |  ------------------
  |  |  |  |   51|  11.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  11.1k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  11.1k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  11.1k|    ptr += n;                                                                  \
  |  |  |  |   57|  11.1k|    break;
  |  |  ------------------
  |  |   63|  11.1k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 36, False: 1.22M]
  |  |  ------------------
  |  |   64|     36|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 1.22M]
  |  |  ------------------
  |  |   65|     42|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 1.22M]
  |  |  ------------------
  |  |   66|     42|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     42|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     42|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  2.21k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 2.21k, False: 1.22M]
  ------------------
  157|  2.21k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.21k|#  define MINBPC(enc) 2
  ------------------
  158|  2.21k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.21k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.21k|    {                                                                          \
  |  |  |  |  135|  2.21k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.21k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.21k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 2.21k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  2.21k|    }
  |  |  ------------------
  ------------------
  159|  2.21k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  2.21k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.21k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.21k, False: 1.00k]
  |  |  |  |  |  Branch (872:49): [True: 867, False: 343]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    867|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    867|#  define MINBPC(enc) 2
  ------------------
  161|    867|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    867|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    867|    {                                                                          \
  |  |  |  |  135|    867|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    867|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    867|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 866]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    867|    }
  |  |  ------------------
  ------------------
  162|    866|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    866|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    866|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 860, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 853, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     13|            *nextTokPtr = ptr;
  164|     13|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  165|     13|          }
  166|    853|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    853|#  define MINBPC(enc) 2
  ------------------
  167|    853|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    853|#define XML_TOK_COMMENT 13
  ------------------
  168|    866|        }
  169|  1.34k|        break;
  170|  1.21M|      default:
  ------------------
  |  Branch (170:7): [True: 1.21M, False: 13.3k]
  ------------------
  171|  1.21M|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.21M|#  define MINBPC(enc) 2
  ------------------
  172|  1.21M|        break;
  173|  1.22M|      }
  174|  1.22M|    }
  175|    999|  }
  176|     67|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.02k|}
xmltok.c:big2_scanPi:
  277|  6.08k|               const char **nextTokPtr) {
  278|  6.08k|  int tok;
  279|  6.08k|  const char *target = ptr;
  280|  6.08k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.08k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.08k|    {                                                                          \
  |  |  |  |  135|  6.08k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.08k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.08k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 6.08k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  6.08k|    }
  |  |  ------------------
  ------------------
  281|  6.08k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.08k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.08k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.55k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.55k, False: 526]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  4.84k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.04k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 501, False: 5.58k]
  |  |  ------------------
  |  |  111|  6.04k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    501|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    501|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    501|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 9, False: 492]
  |  |  ------------------
  |  |  112|      9|      *nextTokPtr = ptr;                                                       \
  |  |  113|      9|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      9|    }                                                                          \
  |  |  115|  6.04k|    /* fall through */                                                         \
  |  |  116|  6.04k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.81k, False: 2.26k]
  |  |  ------------------
  |  |  117|  6.04k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.73k, False: 4.34k]
  |  |  ------------------
  |  |  118|  6.04k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  6.04k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  6.04k|    break;                                                                     \
  |  |  120|  6.04k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.08k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.08k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 6.06k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      8|  default:
  ------------------
  |  Branch (283:3): [True: 8, False: 6.07k]
  ------------------
  284|      8|    *nextTokPtr = ptr;
  285|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  286|  6.08k|  }
  287|   240k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   240k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   240k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   240k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 17.1k, False: 223k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.15M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   234k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 223k, False: 17.2k]
  |  |  ------------------
  |  |   82|   234k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   223k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   223k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   223k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 223k]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|   234k|    /* fall through */                                                         \
  |  |   87|   234k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 6.83k, False: 233k]
  |  |  ------------------
  |  |   88|   231k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.70k, False: 238k]
  |  |  ------------------
  |  |   89|   233k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.86k, False: 238k]
  |  |  ------------------
  |  |   90|   233k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 236, False: 240k]
  |  |  ------------------
  |  |   91|   234k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 581, False: 239k]
  |  |  ------------------
  |  |   92|   234k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   234k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   234k|    break;                                                                     \
  |  |   94|   234k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 240k]
  |  |  |  |  ------------------
  |  |  |  |   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: 240k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 240k]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 6, False: 15]
  |  |  |  |  ------------------
  |  |  |  |   72|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|     15|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    976|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 976, False: 239k]
  ------------------
  291|  2.22k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 1.24k, False: 239k]
  ------------------
  292|  2.62k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 406, False: 240k]
  ------------------
  293|  2.62k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.62k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.62k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.62k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.62k|#  define MINBPC(enc) 2
  ------------------
  298|   350k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   350k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   350k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   350k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 29.7k, False: 320k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  5.60k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 350k]
  |  |  |  |  ------------------
  |  |  |  |   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: 350k]
  |  |  |  |  ------------------
  |  |  |  |   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.77k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.74k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.77k, False: 347k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.77k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 25, False: 2.74k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.74k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     25|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.74k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.74k|#    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.74k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.74k|    break;
  |  |  ------------------
  |  |   63|  2.74k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 39, False: 350k]
  |  |  ------------------
  |  |   64|     39|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 350k]
  |  |  ------------------
  |  |   65|     45|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 350k]
  |  |  ------------------
  |  |   66|     45|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     45|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     45|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  4.72k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 4.72k, False: 345k]
  ------------------
  302|  4.72k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.72k|#  define MINBPC(enc) 2
  ------------------
  303|  4.72k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.72k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.72k|    {                                                                          \
  |  |  |  |  135|  4.72k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.72k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.72k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 4.72k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  4.72k|    }
  |  |  ------------------
  ------------------
  304|  4.72k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  4.72k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.72k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.20k, False: 512]
  |  |  |  |  |  Branch (872:49): [True: 2.45k, False: 1.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.45k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.45k|#  define MINBPC(enc) 2
  ------------------
  306|  2.45k|            return tok;
  307|  2.45k|          }
  308|  2.26k|          break;
  309|   342k|        default:
  ------------------
  |  Branch (309:9): [True: 342k, False: 7.54k]
  ------------------
  310|   342k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|   342k|#  define MINBPC(enc) 2
  ------------------
  311|   342k|          break;
  312|   350k|        }
  313|   350k|      }
  314|     98|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     98|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.30k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.30k, False: 237k]
  ------------------
  316|  3.30k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  3.30k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 3.30k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  3.30k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.30k|#  define MINBPC(enc) 2
  ------------------
  321|  3.30k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.30k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.30k|    {                                                                          \
  |  |  |  |  135|  3.30k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  3.30k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 33, False: 3.27k]
  |  |  |  |  ------------------
  |  |  |  |  136|     33|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     33|      }                                                                        \
  |  |  |  |  138|  3.30k|    }
  |  |  ------------------
  ------------------
  322|  3.27k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  3.27k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.27k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.25k, False: 14]
  |  |  |  |  |  Branch (872:49): [True: 3.24k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  3.24k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.24k|#  define MINBPC(enc) 2
  ------------------
  324|  3.24k|        return tok;
  325|  3.24k|      }
  326|       |      /* fall through */
  327|     48|    default:
  ------------------
  |  Branch (327:5): [True: 22, False: 240k]
  ------------------
  328|     48|      *nextTokPtr = ptr;
  329|     48|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     48|#define XML_TOK_INVALID 0
  ------------------
  330|   240k|    }
  331|   240k|  }
  332|     47|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     47|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.04k|}
xmltok.c:big2_checkPiTarget:
  232|  5.93k|                      int *tokPtr) {
  233|  5.93k|  int upper = 0;
  234|  5.93k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.93k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.93k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.93k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.93k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  5.93k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.12k, False: 3.80k]
  ------------------
  237|  2.12k|    return 1;
  238|  3.80k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.80k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.80k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.49k, False: 317]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.34k|  case ASCII_x:
  ------------------
  |  |   86|  1.34k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.34k, False: 2.46k]
  ------------------
  240|  1.34k|    break;
  241|  1.07k|  case ASCII_X:
  ------------------
  |  |   59|  1.07k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.07k, False: 2.73k]
  ------------------
  242|  1.07k|    upper = 1;
  243|  1.07k|    break;
  244|  1.39k|  default:
  ------------------
  |  Branch (244:3): [True: 1.39k, False: 2.41k]
  ------------------
  245|  1.39k|    return 1;
  246|  3.80k|  }
  247|  2.41k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.41k|#  define MINBPC(enc) 2
  ------------------
  248|  2.41k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.41k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.41k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.98k, False: 430]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|  1.34k|  case ASCII_m:
  ------------------
  |  |   75|  1.34k|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 1.34k, False: 1.07k]
  ------------------
  250|  1.34k|    break;
  251|    628|  case ASCII_M:
  ------------------
  |  |   48|    628|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 628, False: 1.78k]
  ------------------
  252|    628|    upper = 1;
  253|    628|    break;
  254|    445|  default:
  ------------------
  |  Branch (254:3): [True: 445, False: 1.97k]
  ------------------
  255|    445|    return 1;
  256|  2.41k|  }
  257|  1.97k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.97k|#  define MINBPC(enc) 2
  ------------------
  258|  1.97k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.97k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.97k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.51k, False: 461]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     34|  case ASCII_l:
  ------------------
  |  |   74|     34|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 34, False: 1.93k]
  ------------------
  260|     34|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.96k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.93k|  default:
  ------------------
  |  Branch (264:3): [True: 1.93k, False: 36]
  ------------------
  265|  1.93k|    return 1;
  266|  1.97k|  }
  267|     36|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 32]
  ------------------
  268|      4|    return 0;
  269|     32|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     32|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     32|  return 1;
  271|     36|}
xmltok.c:big2_scanPercent:
  924|  1.65k|                    const char **nextTokPtr) {
  925|  1.65k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.65k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.65k|    {                                                                          \
  |  |  |  |  135|  1.65k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.65k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.65k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  1.65k|    }
  |  |  ------------------
  ------------------
  926|  1.64k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.64k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.64k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.49k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.49k, False: 150]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|    691|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    680|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 137, False: 1.50k]
  |  |  ------------------
  |  |  111|    680|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    137|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    137|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    137|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 122]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|    680|    /* fall through */                                                         \
  |  |  116|    680|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 420, False: 1.22k]
  |  |  ------------------
  |  |  117|    680|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 138, False: 1.50k]
  |  |  ------------------
  |  |  118|    680|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|    680|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    680|    break;                                                                     \
  |  |  120|    680|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.64k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|      8|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 8, False: 1.63k]
  |  |  |  |  ------------------
  |  |  |  |  100|      8|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|      4|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    162|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 162, False: 1.48k]
  ------------------
  929|    574|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 412, False: 1.23k]
  ------------------
  930|    933|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 359, False: 1.28k]
  ------------------
  931|    936|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 1.64k]
  ------------------
  932|    936|    *nextTokPtr = ptr;
  933|    936|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    936|#define XML_TOK_PERCENT 22
  ------------------
  934|      5|  default:
  ------------------
  |  Branch (934:3): [True: 5, False: 1.63k]
  ------------------
  935|      5|    *nextTokPtr = ptr;
  936|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  937|  1.64k|  }
  938|  2.66k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.66k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.66k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.66k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.12k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.12k, False: 535]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  5.91k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.04k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 514, False: 2.14k]
  |  |  ------------------
  |  |   82|  2.04k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    514|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    514|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    514|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 23, False: 491]
  |  |  ------------------
  |  |   83|     23|      *nextTokPtr = ptr;                                                       \
  |  |   84|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     23|    }                                                                          \
  |  |   86|  2.04k|    /* fall through */                                                         \
  |  |   87|  2.04k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 389, False: 2.27k]
  |  |  ------------------
  |  |   88|  1.28k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 409, False: 2.25k]
  |  |  ------------------
  |  |   89|  1.49k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 202, False: 2.46k]
  |  |  ------------------
  |  |   90|  1.71k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 223, False: 2.43k]
  |  |  ------------------
  |  |   91|  2.04k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 329, False: 2.33k]
  |  |  ------------------
  |  |   92|  2.04k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.04k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.04k|    break;                                                                     \
  |  |   94|  2.04k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.66k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.66k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     14|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 2.64k]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 10]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     20|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|     10|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|    572|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 572, False: 2.09k]
  ------------------
  942|    572|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    572|#  define MINBPC(enc) 2
  ------------------
  943|    572|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    572|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     10|    default:
  ------------------
  |  Branch (944:5): [True: 10, False: 2.65k]
  ------------------
  945|     10|      *nextTokPtr = ptr;
  946|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  947|  2.66k|    }
  948|  2.66k|  }
  949|     61|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     61|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    680|}
xmltok.c:big2_scanPoundName:
  954|    540|                      const char **nextTokPtr) {
  955|    540|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    540|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    540|    {                                                                          \
  |  |  |  |  135|    540|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    540|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    540|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 539]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    540|    }
  |  |  ------------------
  ------------------
  956|    539|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    539|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    539|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    470|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 470, False: 69]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|    423|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    501|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 42, False: 497]
  |  |  ------------------
  |  |  111|    501|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     42|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     42|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     42|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 31]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|    501|    /* fall through */                                                         \
  |  |  116|    501|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 310, False: 229]
  |  |  ------------------
  |  |  117|    501|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 160, False: 379]
  |  |  ------------------
  |  |  118|    501|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|    501|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    501|    break;                                                                     \
  |  |  120|    501|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 539]
  |  |  |  |  ------------------
  |  |  |  |  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: 539]
  |  |  |  |  ------------------
  |  |  |  |  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: 517]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 534]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|    539|  }
  962|  5.48k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  5.48k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.48k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.48k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.37k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.37k, False: 1.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  17.1k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  5.03k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.09k, False: 4.39k]
  |  |  ------------------
  |  |   82|  5.03k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.09k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.09k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.09k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 12, False: 1.08k]
  |  |  ------------------
  |  |   83|     12|      *nextTokPtr = ptr;                                                       \
  |  |   84|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     12|    }                                                                          \
  |  |   86|  5.03k|    /* fall through */                                                         \
  |  |   87|  5.03k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.75k, False: 3.73k]
  |  |  ------------------
  |  |   88|  4.06k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.22k, False: 4.26k]
  |  |  ------------------
  |  |   89|  4.48k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 416, False: 5.07k]
  |  |  ------------------
  |  |   90|  4.67k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 195, False: 5.29k]
  |  |  ------------------
  |  |   91|  5.03k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 361, False: 5.12k]
  |  |  ------------------
  |  |   92|  5.03k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  5.03k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  5.03k|    break;                                                                     \
  |  |   94|  5.03k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 5.48k]
  |  |  |  |  ------------------
  |  |  |  |   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: 5.48k]
  |  |  |  |  ------------------
  |  |  |  |   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: 5.48k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    194|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 194, False: 5.29k]
  ------------------
  966|    213|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 19, False: 5.46k]
  ------------------
  967|    320|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 107, False: 5.38k]
  ------------------
  968|    365|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 45, False: 5.44k]
  ------------------
  969|    400|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 35, False: 5.45k]
  ------------------
  970|    401|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 5.48k]
  ------------------
  971|    420|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 19, False: 5.46k]
  ------------------
  972|    420|      *nextTokPtr = ptr;
  973|    420|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|    420|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     11|    default:
  ------------------
  |  Branch (974:5): [True: 11, False: 5.47k]
  ------------------
  975|     11|      *nextTokPtr = ptr;
  976|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  977|  5.48k|    }
  978|  5.48k|  }
  979|     50|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     50|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|    501|}
xmltok.c:big2_contentTok:
  824|   103k|                   const char **nextTokPtr) {
  825|   103k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 763, False: 102k]
  ------------------
  826|    763|    return XML_TOK_NONE;
  ------------------
  |  |   51|    763|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|   102k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|   102k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|   102k|    size_t n = end - ptr;
  829|   102k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|   102k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 42.1k, False: 60.2k]
  ------------------
  830|  42.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  42.1k|#  define MINBPC(enc) 2
  ------------------
  831|  42.1k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 153, False: 41.9k]
  ------------------
  832|    153|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    153|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  41.9k|      end = ptr + n;
  834|  41.9k|    }
  835|   102k|  }
  836|   102k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   102k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   102k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  87.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 87.3k, False: 14.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  18.2k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 18.2k, False: 83.9k]
  ------------------
  838|  18.2k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  18.2k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  18.2k|#  define MINBPC(enc) 2
  ------------------
  839|  13.8k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 13.8k, False: 88.3k]
  ------------------
  840|  13.8k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  13.8k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  13.8k|#  define MINBPC(enc) 2
  ------------------
  841|  19.4k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 19.4k, False: 82.7k]
  ------------------
  842|  19.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  19.4k|#  define MINBPC(enc) 2
  ------------------
  843|  19.4k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  19.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  19.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  19.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 13, False: 19.4k]
  ------------------
  844|     13|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     13|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  19.4k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  19.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  19.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  16.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 16.4k, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 930, False: 18.5k]
  ------------------
  846|    930|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    930|#  define MINBPC(enc) 2
  ------------------
  847|  19.4k|    *nextTokPtr = ptr;
  848|  19.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  19.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  12.4k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 12.4k, False: 89.7k]
  ------------------
  850|  12.4k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  12.4k|#  define MINBPC(enc) 2
  ------------------
  851|  12.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  12.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  13.9k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 13.9k, False: 88.2k]
  ------------------
  853|  13.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.9k|#  define MINBPC(enc) 2
  ------------------
  854|  13.9k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  13.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  13.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  13.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 8, False: 13.9k]
  ------------------
  855|      8|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      8|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  13.9k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  13.9k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  13.9k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 13.0k, False: 890]
  |  |  |  |  |  Branch (872:49): [True: 10.2k, False: 2.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  3.73k|      break;
  858|  10.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  10.2k|#  define MINBPC(enc) 2
  ------------------
  859|  10.2k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  10.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  10.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 6, False: 10.2k]
  ------------------
  860|      6|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      6|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  10.2k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  10.2k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  10.2k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 9.37k, False: 837]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 9.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  10.2k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  10.2k|#  define MINBPC(enc) 2
  ------------------
  863|  10.2k|      break;
  864|  10.2k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  16.9k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 102k]
  |  |  |  |  ------------------
  |  |  |  |   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: 102k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  8.38k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.33k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.38k, False: 93.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.38k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 45, False: 8.33k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.33k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     45|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.33k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  8.33k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  8.33k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.33k|    break;
  |  |  ------------------
  |  |   63|  8.33k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 104, False: 102k]
  |  |  ------------------
  |  |   64|    104|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 102k]
  |  |  ------------------
  |  |   65|    112|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 102k]
  |  |  ------------------
  |  |   66|    112|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|    112|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|    112|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  15.8k|  default:
  ------------------
  |  Branch (868:3): [True: 15.8k, False: 86.4k]
  ------------------
  869|  15.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  15.8k|#  define MINBPC(enc) 2
  ------------------
  870|  15.8k|    break;
  871|   102k|  }
  872|  1.46M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  1.46M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.46M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.46M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   113k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 113k, False: 1.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.46M]
  |  |  ------------------
  |  |  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.46M]
  |  |  ------------------
  |  |  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|  37.9k|      LEAD_CASE(4)
  ------------------
  |  |  875|  37.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 37.9k, False: 1.42M]
  |  |  ------------------
  |  |  876|  37.9k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  37.9k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 41, False: 37.9k]
  |  |  ------------------
  |  |  877|     41|      *nextTokPtr = ptr;                                                       \
  |  |  878|     41|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     41|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     41|    }                                                                          \
  |  |  880|  37.9k|    ptr += n;                                                                  \
  |  |  881|  37.9k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  19.3k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 19.3k, False: 1.44M]
  ------------------
  887|  19.3k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  19.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  19.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 19.3k, False: 5]
  |  |  ------------------
  ------------------
  888|  19.3k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  19.3k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  19.3k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 16.0k, False: 3.21k]
  |  |  |  |  |  Branch (872:49): [True: 2.88k, False: 13.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  16.4k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  16.4k|#  define MINBPC(enc) 2
  ------------------
  890|  16.4k|          break;
  891|  16.4k|        }
  892|  2.88k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  2.88k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  2.88k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.87k, False: 6]
  |  |  ------------------
  ------------------
  893|  2.87k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  2.87k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.87k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.09k, False: 781]
  |  |  |  |  |  Branch (872:49): [True: 3, False: 2.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  2.87k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.87k|#  define MINBPC(enc) 2
  ------------------
  895|  2.87k|            break;
  896|  2.87k|          }
  897|      3|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      3|#  define MINBPC(enc) 2
  ------------------
  898|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  899|  2.87k|        }
  900|  2.88k|      }
  901|       |      /* fall through */
  902|  4.98k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 4.97k, False: 1.45M]
  ------------------
  903|  10.3k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 5.32k, False: 1.45M]
  ------------------
  904|  10.3k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 67, False: 1.46M]
  ------------------
  905|  10.3k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 1.46M]
  ------------------
  906|  10.3k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 5, False: 1.46M]
  ------------------
  907|  25.5k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 15.2k, False: 1.44M]
  ------------------
  908|  37.6k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 12.0k, False: 1.45M]
  ------------------
  909|  37.6k|      *nextTokPtr = ptr;
  910|  37.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  37.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  1.36M|    default:
  ------------------
  |  Branch (911:5): [True: 1.36M, False: 94.9k]
  ------------------
  912|  1.36M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.36M|#  define MINBPC(enc) 2
  ------------------
  913|  1.36M|      break;
  914|  1.46M|    }
  915|  1.46M|  }
  916|    359|  *nextTokPtr = ptr;
  917|    359|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    359|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  38.0k|}
xmltok.c:big2_scanLt:
  726|  18.2k|               const char **nextTokPtr) {
  727|  18.2k|#  ifdef XML_NS
  728|  18.2k|  int hadColon;
  729|  18.2k|#  endif
  730|  18.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  18.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  18.2k|    {                                                                          \
  |  |  |  |  135|  18.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  18.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  18.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 18.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  18.2k|    }
  |  |  ------------------
  ------------------
  731|  18.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  18.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  18.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.7k, False: 3.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  11.4k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.43k, False: 14.7k]
  |  |  ------------------
  |  |  111|  11.4k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  3.43k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  3.43k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.43k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 23, False: 3.41k]
  |  |  ------------------
  |  |  112|     23|      *nextTokPtr = ptr;                                                       \
  |  |  113|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     23|    }                                                                          \
  |  |  115|  11.4k|    /* fall through */                                                         \
  |  |  116|  11.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.52k, False: 13.7k]
  |  |  ------------------
  |  |  117|  11.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.50k, False: 14.7k]
  |  |  ------------------
  |  |  118|  11.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  11.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  11.4k|    break;                                                                     \
  |  |  120|  11.4k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 18.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 18.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 18.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.11k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.11k, False: 17.1k]
  ------------------
  734|  1.11k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.11k|#  define MINBPC(enc) 2
  ------------------
  735|  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: 1, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.11k|    }
  |  |  ------------------
  ------------------
  736|  1.11k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.11k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.11k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.09k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 21, False: 1.09k]
  |  |  |  |  |  Branch (870:4): [True: 1.09k, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    333|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 333, False: 780]
  ------------------
  738|    333|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    333|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    333|#  define MINBPC(enc) 2
  ------------------
  739|    759|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 759, False: 354]
  ------------------
  740|    759|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    759|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    759|#  define MINBPC(enc) 2
  ------------------
  741|  1.11k|    }
  742|     21|    *nextTokPtr = ptr;
  743|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  744|  3.92k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.92k, False: 14.3k]
  ------------------
  745|  3.92k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.92k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.92k|#  define MINBPC(enc) 2
  ------------------
  746|  1.69k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.69k, False: 16.5k]
  ------------------
  747|  1.69k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.69k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.69k|#  define MINBPC(enc) 2
  ------------------
  748|     14|  default:
  ------------------
  |  Branch (748:3): [True: 14, False: 18.2k]
  ------------------
  749|     14|    *nextTokPtr = ptr;
  750|     14|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  751|  18.2k|  }
  752|  11.4k|#  ifdef XML_NS
  753|  11.4k|  hadColon = 0;
  754|  11.4k|#  endif
  755|       |  /* we have a start-tag */
  756|  57.6k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  57.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  57.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  57.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.2k, False: 42.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|   224k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  46.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 42.3k, False: 15.3k]
  |  |  ------------------
  |  |   82|  46.3k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  42.3k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  42.3k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  42.3k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 42.3k]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  46.3k|    /* fall through */                                                         \
  |  |   87|  46.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.03k, False: 55.6k]
  |  |  ------------------
  |  |   88|  45.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.15k, False: 56.5k]
  |  |  ------------------
  |  |   89|  45.8k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 305, False: 57.3k]
  |  |  ------------------
  |  |   90|  46.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 57.4k]
  |  |  ------------------
  |  |   91|  46.3k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 251, False: 57.4k]
  |  |  ------------------
  |  |   92|  46.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  46.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  46.3k|    break;                                                                     \
  |  |   94|  46.3k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 57.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 57.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     11|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 11, False: 57.6k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 57.6k]
  ------------------
  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|  3.27k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 3.27k, False: 54.4k]
  ------------------
  777|  4.67k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.39k, False: 56.3k]
  ------------------
  778|  5.87k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.20k, False: 56.4k]
  ------------------
  779|  5.87k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.87k|#  define MINBPC(enc) 2
  ------------------
  780|  7.53k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  7.53k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.53k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.53k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.83k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.83k, False: 701]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  4.08k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.15k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 679, False: 6.85k]
  |  |  ------------------
  |  |  111|  4.15k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    679|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    679|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    679|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 668]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  4.15k|    /* fall through */                                                         \
  |  |  116|  4.15k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.70k, False: 4.83k]
  |  |  ------------------
  |  |  117|  4.15k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 776, False: 6.76k]
  |  |  ------------------
  |  |  118|  4.15k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  4.15k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  4.15k|    break;                                                                     \
  |  |  120|  4.15k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 7.53k]
  |  |  |  |  ------------------
  |  |  |  |  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: 7.53k]
  |  |  |  |  ------------------
  |  |  |  |  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: 7.52k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  783|  1.29k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.29k, False: 6.23k]
  ------------------
  784|  1.29k|          goto gt;
  785|    352|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 352, False: 7.18k]
  ------------------
  786|    352|          goto sol;
  787|    632|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 632, False: 6.90k]
  ------------------
  788|  1.38k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 757, False: 6.78k]
  ------------------
  789|  1.69k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 305, False: 7.23k]
  ------------------
  790|  1.69k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.69k|#  define MINBPC(enc) 2
  ------------------
  791|  1.69k|          continue;
  792|     14|        default:
  ------------------
  |  Branch (792:9): [True: 14, False: 7.52k]
  ------------------
  793|     14|          *nextTokPtr = ptr;
  794|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  795|  7.53k|        }
  796|  4.15k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  4.15k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  7.53k|      }
  798|     30|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     30|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  5.87k|    }
  800|  5.16k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.16k, False: 52.5k]
  ------------------
  801|  6.46k|    gt:
  802|  6.46k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.46k|#  define MINBPC(enc) 2
  ------------------
  803|  6.46k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  6.46k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    290|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 290, False: 57.4k]
  ------------------
  805|    642|    sol:
  806|    642|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    642|#  define MINBPC(enc) 2
  ------------------
  807|    642|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    642|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    642|    {                                                                          \
  |  |  |  |  135|    642|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    642|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    642|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 630]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|    642|    }
  |  |  ------------------
  ------------------
  808|    630|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    630|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    630|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 622, False: 8]
  |  |  |  |  |  Branch (872:49): [True: 611, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     19|        *nextTokPtr = ptr;
  810|     19|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  811|     19|      }
  812|    611|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    611|#  define MINBPC(enc) 2
  ------------------
  813|    611|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    611|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     19|    default:
  ------------------
  |  Branch (814:5): [True: 19, False: 57.6k]
  ------------------
  815|     19|      *nextTokPtr = ptr;
  816|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  817|  57.6k|    }
  818|  57.6k|  }
  819|     62|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     62|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  11.4k|}
xmltok.c:big2_scanCdataSection:
  337|    759|                         const char **nextTokPtr) {
  338|    759|  static const char CDATA_LSQB[]
  339|    759|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    759|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    759|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    759|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    759|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    759|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    759|#define ASCII_LSQB 0x5B
  ------------------
  340|    759|  int i;
  341|    759|  UNUSED_P(enc);
  ------------------
  |  |  135|    759|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    759|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    759|    {                                                                          \
  |  |  135|    759|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    759|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    759|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 4, False: 755]
  |  |  ------------------
  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      4|      }                                                                        \
  |  |  138|    759|    }
  ------------------
  344|  5.21k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  4.46k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 4.47k, False: 737]
  ------------------
  345|  4.47k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  4.47k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.47k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.47k, False: 5]
  |  |  |  |  |  Branch (872:49): [True: 4.46k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     18|      *nextTokPtr = ptr;
  347|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  348|     18|    }
  349|  4.47k|  }
  350|    737|  *nextTokPtr = ptr;
  351|    737|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    737|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    755|}
xmltok.c:big2_scanEndTag:
  432|  1.69k|                   const char **nextTokPtr) {
  433|  1.69k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.69k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.69k|    {                                                                          \
  |  |  |  |  135|  1.69k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.69k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.69k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.69k|    }
  |  |  ------------------
  ------------------
  434|  1.69k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.69k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.69k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.13k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.13k, False: 554]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.63k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.66k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 529, False: 1.16k]
  |  |  ------------------
  |  |  111|  1.66k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    529|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    529|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    529|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 7, False: 522]
  |  |  ------------------
  |  |  112|      7|      *nextTokPtr = ptr;                                                       \
  |  |  113|      7|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      7|    }                                                                          \
  |  |  115|  1.66k|    /* fall through */                                                         \
  |  |  116|  1.66k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 548, False: 1.14k]
  |  |  ------------------
  |  |  117|  1.66k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 590, False: 1.10k]
  |  |  ------------------
  |  |  118|  1.66k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.66k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.66k|    break;                                                                     \
  |  |  120|  1.66k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.69k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.69k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 1.67k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.68k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.69k|  }
  440|  3.45k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.45k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.45k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.45k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.96k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.96k, False: 495]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  5.26k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.85k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 470, False: 2.98k]
  |  |  ------------------
  |  |   82|  1.85k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    470|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    470|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    470|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 24, False: 446]
  |  |  ------------------
  |  |   83|     24|      *nextTokPtr = ptr;                                                       \
  |  |   84|     24|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     24|    }                                                                          \
  |  |   86|  1.85k|    /* fall through */                                                         \
  |  |   87|  1.85k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 297, False: 3.16k]
  |  |  ------------------
  |  |   88|  1.04k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 304, False: 3.15k]
  |  |  ------------------
  |  |   89|  1.37k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 332, False: 3.12k]
  |  |  ------------------
  |  |   90|  1.58k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 3.25k]
  |  |  ------------------
  |  |   91|  1.85k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 266, False: 3.19k]
  |  |  ------------------
  |  |   92|  1.85k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.85k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.85k|    break;                                                                     \
  |  |   94|  1.85k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.45k]
  |  |  |  |  ------------------
  |  |  |  |   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.45k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     20|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 3.43k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    225|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 225, False: 3.23k]
  ------------------
  444|    409|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 184, False: 3.27k]
  ------------------
  445|  1.01k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 601, False: 2.85k]
  ------------------
  446|  1.72k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.01k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    748|#  define MINBPC(enc) 2
  ------------------
  447|  1.72k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.72k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.72k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.69k, False: 33]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    197|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 197, False: 1.53k]
  ------------------
  449|    463|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 266, False: 1.46k]
  ------------------
  450|    748|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 285, False: 1.44k]
  ------------------
  451|    748|          break;
  452|    939|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 939, False: 788]
  ------------------
  453|    939|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    939|#  define MINBPC(enc) 2
  ------------------
  454|    939|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    939|#define XML_TOK_END_TAG 5
  ------------------
  455|     40|        default:
  ------------------
  |  Branch (455:9): [True: 40, False: 1.68k]
  ------------------
  456|     40|          *nextTokPtr = ptr;
  457|     40|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     40|#define XML_TOK_INVALID 0
  ------------------
  458|  1.72k|        }
  459|  1.72k|      }
  460|     31|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     31|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 3.45k]
  ------------------
  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|    544|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 544, False: 2.91k]
  ------------------
  469|    544|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    544|#  define MINBPC(enc) 2
  ------------------
  470|    544|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    544|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 3.44k]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  3.45k|    }
  475|  3.45k|  }
  476|     54|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     54|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.66k|}
xmltok.c:big2_scanAtts:
  573|  4.15k|                 const char **nextTokPtr) {
  574|  4.15k|#  ifdef XML_NS
  575|  4.15k|  int hadColon = 0;
  576|  4.15k|#  endif
  577|   106k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   106k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   106k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   106k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   105k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 105k, False: 1.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  40.8k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  10.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.26k, False: 105k]
  |  |  ------------------
  |  |   82|  10.5k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.26k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.26k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.26k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 1.24k]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  10.5k|    /* fall through */                                                         \
  |  |   87|  10.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 7.93k, False: 98.4k]
  |  |  ------------------
  |  |   88|  9.89k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 718, False: 105k]
  |  |  ------------------
  |  |   89|  10.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 234, False: 106k]
  |  |  ------------------
  |  |   90|  10.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 217, False: 106k]
  |  |  ------------------
  |  |   91|  10.5k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 249, False: 106k]
  |  |  ------------------
  |  |   92|  10.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  10.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  10.5k|    break;                                                                     \
  |  |   94|  10.5k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 106k]
  |  |  |  |  ------------------
  |  |  |  |   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: 106k]
  |  |  |  |  ------------------
  |  |  |  |   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: 106k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 106k]
  ------------------
  582|      0|      if (hadColon) {
  ------------------
  |  Branch (582:11): [True: 0, False: 0]
  ------------------
  583|      0|        *nextTokPtr = ptr;
  584|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  585|      0|      }
  586|      0|      hadColon = 1;
  587|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
  588|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  589|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  590|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  591|      0|      default:
  ------------------
  |  Branch (591:7): [True: 0, False: 0]
  ------------------
  592|      0|        *nextTokPtr = ptr;
  593|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  594|      0|      }
  595|      0|      break;
  596|      0|#  endif
  597|    659|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 659, False: 105k]
  ------------------
  598|    748|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 89, False: 106k]
  ------------------
  599|  1.10k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 353, False: 106k]
  ------------------
  600|  2.16k|      for (;;) {
  601|  2.16k|        int t;
  602|       |
  603|  2.16k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.16k|#  define MINBPC(enc) 2
  ------------------
  604|  2.16k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.16k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.16k|    {                                                                          \
  |  |  |  |  135|  2.16k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.16k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.16k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 33, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  136|     33|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     33|      }                                                                        \
  |  |  |  |  138|  2.16k|    }
  |  |  ------------------
  ------------------
  605|  2.12k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  2.12k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.12k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.10k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.10k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.12k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.03k, False: 1.09k]
  ------------------
  607|  1.03k|          break;
  608|  1.09k|        switch (t) {
  609|    576|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 576, False: 518]
  ------------------
  610|    799|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 223, False: 871]
  ------------------
  611|  1.06k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 261, False: 833]
  ------------------
  612|  1.06k|          break;
  613|     34|        default:
  ------------------
  |  Branch (613:9): [True: 34, False: 1.06k]
  ------------------
  614|     34|          *nextTokPtr = ptr;
  615|     34|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  616|  1.09k|        }
  617|  1.09k|      }
  618|       |      /* fall through */
  619|  95.6k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 94.6k, False: 11.7k]
  ------------------
  620|  95.6k|      int open;
  621|  95.6k|#  ifdef XML_NS
  622|  95.6k|      hadColon = 0;
  623|  95.6k|#  endif
  624|  96.3k|      for (;;) {
  625|  96.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  96.3k|#  define MINBPC(enc) 2
  ------------------
  626|  96.3k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  96.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  96.3k|    {                                                                          \
  |  |  |  |  135|  96.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  96.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  96.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 96.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|  96.3k|    }
  |  |  ------------------
  ------------------
  627|  96.3k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  96.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  96.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  96.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 96.3k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|  96.3k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 77.6k, False: 18.6k]
  |  Branch (628:32): [True: 17.9k, False: 704]
  ------------------
  629|  95.6k|          break;
  630|    704|        switch (open) {
  631|    215|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 215, False: 489]
  ------------------
  632|    477|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 262, False: 442]
  ------------------
  633|    675|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 198, False: 506]
  ------------------
  634|    675|          break;
  635|     29|        default:
  ------------------
  |  Branch (635:9): [True: 29, False: 675]
  ------------------
  636|     29|          *nextTokPtr = ptr;
  637|     29|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  638|    704|        }
  639|    704|      }
  640|  95.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  95.6k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  7.01M|      for (;;) {
  643|  7.01M|        int t;
  644|  7.01M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.01M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.01M|    {                                                                          \
  |  |  |  |  135|  7.01M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.01M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  7.01M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 52, False: 7.01M]
  |  |  |  |  ------------------
  |  |  |  |  136|     52|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     52|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     52|      }                                                                        \
  |  |  |  |  138|  7.01M|    }
  |  |  ------------------
  ------------------
  645|  7.01M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  7.01M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.01M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   334k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 334k, False: 6.67M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  7.01M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 95.4k, False: 6.91M]
  ------------------
  647|  95.4k|          break;
  648|  6.91M|        switch (t) {
  649|  90.1k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 6.91M]
  |  |  |  |  ------------------
  |  |  |  |   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.91M]
  |  |  |  |  ------------------
  |  |  |  |   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|  45.0k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  45.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 45.0k, False: 6.87M]
  |  |  |  |  ------------------
  |  |  |  |   50|  45.0k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 20, False: 45.0k]
  |  |  |  |  ------------------
  |  |  |  |   51|  45.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     20|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  45.0k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  45.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|  45.0k|    ptr += n;                                                                  \
  |  |  |  |   57|  45.0k|    break;
  |  |  ------------------
  |  |   63|  45.0k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 27, False: 6.91M]
  |  |  ------------------
  |  |   64|     27|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 6.91M]
  |  |  ------------------
  |  |   65|     32|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 6.91M]
  |  |  ------------------
  |  |   66|     32|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     32|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  54.2k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 54.2k, False: 6.86M]
  ------------------
  651|  54.2k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|  54.2k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|  54.2k|#  define MINBPC(enc) 2
  ------------------
  652|  54.2k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 17, False: 54.2k]
  ------------------
  653|     17|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 9, False: 8]
  ------------------
  654|      9|              *nextTokPtr = ptr;
  655|     17|            return tok;
  656|     17|          }
  657|  54.2k|          break;
  658|  54.2k|        }
  659|  54.2k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 10, False: 6.91M]
  ------------------
  660|     10|          *nextTokPtr = ptr;
  661|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  662|  6.81M|        default:
  ------------------
  |  Branch (662:9): [True: 6.81M, False: 99.3k]
  ------------------
  663|  6.81M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.81M|#  define MINBPC(enc) 2
  ------------------
  664|  6.81M|          break;
  665|  6.91M|        }
  666|  6.91M|      }
  667|  95.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  95.4k|#  define MINBPC(enc) 2
  ------------------
  668|  95.4k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  95.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  95.4k|    {                                                                          \
  |  |  |  |  135|  95.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  95.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  95.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 95.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  95.4k|    }
  |  |  ------------------
  ------------------
  669|  95.4k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  95.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  95.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  95.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 95.4k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  17.4k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 17.4k, False: 77.9k]
  ------------------
  671|  17.8k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 385, False: 95.1k]
  ------------------
  672|  93.3k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 75.4k, False: 20.0k]
  ------------------
  673|  93.3k|        break;
  674|    311|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 311, False: 95.1k]
  ------------------
  675|    311|        goto sol;
  676|  1.84k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.84k, False: 93.6k]
  ------------------
  677|  1.84k|        goto gt;
  678|     28|      default:
  ------------------
  |  Branch (678:7): [True: 28, False: 95.4k]
  ------------------
  679|     28|        *nextTokPtr = ptr;
  680|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  681|  95.4k|      }
  682|       |      /* ptr points to closing quote */
  683|  96.3k|      for (;;) {
  684|  96.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  96.3k|#  define MINBPC(enc) 2
  ------------------
  685|  96.3k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  96.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  96.3k|    {                                                                          \
  |  |  |  |  135|  96.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  96.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  96.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 24, False: 96.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|     24|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     24|      }                                                                        \
  |  |  |  |  138|  96.3k|    }
  |  |  ------------------
  ------------------
  686|  96.3k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  96.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  96.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  95.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 95.7k, False: 641]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|  79.7k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  91.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 615, False: 95.7k]
  |  |  ------------------
  |  |  111|  91.7k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    615|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    615|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    615|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 602]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  91.7k|    /* fall through */                                                         \
  |  |  116|  91.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 78.4k, False: 17.8k]
  |  |  ------------------
  |  |  117|  91.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 12.6k, False: 83.6k]
  |  |  ------------------
  |  |  118|  91.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  91.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  91.7k|    break;                                                                     \
  |  |  120|  91.7k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 96.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 96.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 96.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    416|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 416, False: 95.9k]
  ------------------
  689|    642|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 226, False: 96.1k]
  ------------------
  690|  3.07k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 2.43k, False: 93.9k]
  ------------------
  691|  3.07k|          continue;
  692|    767|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 767, False: 95.5k]
  ------------------
  693|  2.61k|        gt:
  694|  2.61k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.61k|#  define MINBPC(enc) 2
  ------------------
  695|  2.61k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  2.61k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    745|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 745, False: 95.6k]
  ------------------
  697|  1.05k|        sol:
  698|  1.05k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.05k|#  define MINBPC(enc) 2
  ------------------
  699|  1.05k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.05k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.05k|    {                                                                          \
  |  |  |  |  135|  1.05k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.05k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.05k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  1.05k|    }
  |  |  ------------------
  ------------------
  700|  1.05k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  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: 1.04k, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 1.03k, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     12|            *nextTokPtr = ptr;
  702|     12|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  703|     12|          }
  704|  1.03k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.03k|#  define MINBPC(enc) 2
  ------------------
  705|  1.03k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  1.03k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|     11|        default:
  ------------------
  |  Branch (706:9): [True: 11, False: 96.3k]
  ------------------
  707|     11|          *nextTokPtr = ptr;
  708|     11|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  709|  96.3k|        }
  710|  91.7k|        break;
  711|  96.3k|      }
  712|  91.7k|      break;
  713|  93.3k|    }
  714|  91.7k|    default:
  ------------------
  |  Branch (714:5): [True: 12, False: 106k]
  ------------------
  715|     12|      *nextTokPtr = ptr;
  716|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  717|   106k|    }
  718|   106k|  }
  719|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  4.15k|}
xmltok.c:big2_scanRef:
  545|   121k|                const char **nextTokPtr) {
  546|   121k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   121k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   121k|    {                                                                          \
  |  |  |  |  135|   121k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   121k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   121k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 121k]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|   121k|    }
  |  |  ------------------
  ------------------
  547|   121k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   121k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   121k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   119k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 119k, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  8.93k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   115k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.00k, False: 119k]
  |  |  ------------------
  |  |  111|   115k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.00k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.00k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.00k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 1.99k]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|   115k|    /* fall through */                                                         \
  |  |  116|   115k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.92k, False: 116k]
  |  |  ------------------
  |  |  117|   115k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 108k, False: 12.7k]
  |  |  ------------------
  |  |  118|   115k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   115k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   115k|    break;                                                                     \
  |  |  120|   115k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 121k]
  |  |  |  |  ------------------
  |  |  |  |  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: 121k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      7|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 7, False: 121k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      2|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      4|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|      2|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  5.76k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 5.76k, False: 115k]
  ------------------
  550|  5.76k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.76k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.76k|#  define MINBPC(enc) 2
  ------------------
  551|     21|  default:
  ------------------
  |  Branch (551:3): [True: 21, False: 121k]
  ------------------
  552|     21|    *nextTokPtr = ptr;
  553|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  554|   121k|  }
  555|   146k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   146k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   146k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   146k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   141k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 141k, False: 4.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   122k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  31.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 4.28k, False: 141k]
  |  |  ------------------
  |  |   82|  31.0k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  4.28k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  4.28k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.28k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 27, False: 4.26k]
  |  |  ------------------
  |  |   83|     27|      *nextTokPtr = ptr;                                                       \
  |  |   84|     27|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     27|    }                                                                          \
  |  |   86|  31.0k|    /* fall through */                                                         \
  |  |   87|  31.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 23.0k, False: 123k]
  |  |  ------------------
  |  |   88|  29.1k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.82k, False: 144k]
  |  |  ------------------
  |  |   89|  30.4k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.22k, False: 144k]
  |  |  ------------------
  |  |   90|  30.7k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 352, False: 145k]
  |  |  ------------------
  |  |   91|  31.0k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 272, False: 145k]
  |  |  ------------------
  |  |   92|  31.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  31.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  31.0k|    break;                                                                     \
  |  |   94|  31.0k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 146k]
  |  |  |  |  ------------------
  |  |  |  |   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: 146k]
  |  |  |  |  ------------------
  |  |  |  |   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|      6|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 6, False: 146k]
  |  |  |  |  ------------------
  |  |  |  |   71|      6|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   115k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 115k, False: 31.0k]
  ------------------
  559|   115k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   115k|#  define MINBPC(enc) 2
  ------------------
  560|   115k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   115k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     31|    default:
  ------------------
  |  Branch (561:5): [True: 31, False: 146k]
  ------------------
  562|     31|      *nextTokPtr = ptr;
  563|     31|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  564|   146k|    }
  565|   146k|  }
  566|     58|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     58|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   115k|}
xmltok.c:big2_scanCharRef:
  514|  5.76k|                    const char **nextTokPtr) {
  515|  5.76k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  5.76k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.76k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.76k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 5.76k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  5.76k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  5.76k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.76k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.75k, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 4.62k, False: 1.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  4.62k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.62k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.62k|#  define MINBPC(enc) 2
  ------------------
  518|  1.13k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.13k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.13k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.12k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.12k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.11k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.11k, False: 19]
  ------------------
  520|  1.11k|      break;
  521|     19|    default:
  ------------------
  |  Branch (521:5): [True: 19, False: 1.11k]
  ------------------
  522|     19|      *nextTokPtr = ptr;
  523|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  524|  1.13k|    }
  525|  3.67k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.11k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  2.56k|#  define MINBPC(enc) 2
  ------------------
  526|  3.67k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.67k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.67k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.65k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.65k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  2.56k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 2.56k, False: 1.10k]
  ------------------
  528|  2.56k|        break;
  529|  1.08k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.08k, False: 2.58k]
  ------------------
  530|  1.08k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.08k|#  define MINBPC(enc) 2
  ------------------
  531|  1.08k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.08k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     21|      default:
  ------------------
  |  Branch (532:7): [True: 21, False: 3.65k]
  ------------------
  533|     21|        *nextTokPtr = ptr;
  534|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  535|  3.67k|      }
  536|  3.67k|    }
  537|  1.11k|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  5.76k|}
xmltok.c:big2_scanHexCharRef:
  483|  4.62k|                       const char **nextTokPtr) {
  484|  4.62k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.62k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.62k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.62k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.62k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.62k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.62k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.62k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.61k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.61k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  2.22k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 2.22k, False: 2.40k]
  ------------------
  487|  4.61k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.38k, False: 2.23k]
  ------------------
  488|  4.61k|      break;
  489|     13|    default:
  ------------------
  |  Branch (489:5): [True: 13, False: 4.61k]
  ------------------
  490|     13|      *nextTokPtr = ptr;
  491|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  492|  4.62k|    }
  493|  17.5k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  4.61k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  12.9k|#  define MINBPC(enc) 2
  ------------------
  494|  17.5k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  17.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  17.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 17.5k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  8.00k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 8.00k, False: 9.53k]
  ------------------
  496|  12.9k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 4.93k, False: 12.6k]
  ------------------
  497|  12.9k|        break;
  498|  4.57k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 4.57k, False: 12.9k]
  ------------------
  499|  4.57k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.57k|#  define MINBPC(enc) 2
  ------------------
  500|  4.57k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.57k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     28|      default:
  ------------------
  |  Branch (501:7): [True: 28, False: 17.5k]
  ------------------
  502|     28|        *nextTokPtr = ptr;
  503|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  504|  17.5k|      }
  505|  17.5k|    }
  506|  4.61k|  }
  507|     14|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.62k|}
xmltok.c:big2_cdataSectionTok:
  356|  75.3k|                        const char **nextTokPtr) {
  357|  75.3k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 111, False: 75.2k]
  ------------------
  358|    111|    return XML_TOK_NONE;
  ------------------
  |  |   51|    111|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  75.2k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  75.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  75.2k|    size_t n = end - ptr;
  361|  75.2k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  75.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 34.4k, False: 40.7k]
  ------------------
  362|  34.4k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  34.4k|#  define MINBPC(enc) 2
  ------------------
  363|  34.4k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 40, False: 34.4k]
  ------------------
  364|     40|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  34.4k|      end = ptr + n;
  366|  34.4k|    }
  367|  75.2k|  }
  368|  75.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  75.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  75.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  57.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 57.3k, False: 17.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  20.8k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 20.8k, False: 54.3k]
  ------------------
  370|  20.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  20.8k|#  define MINBPC(enc) 2
  ------------------
  371|  20.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  20.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  20.8k|    {                                                                          \
  |  |  |  |  135|  20.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  20.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  20.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 20.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  20.8k|    }
  |  |  ------------------
  ------------------
  372|  20.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  20.8k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  20.8k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 17.2k, False: 3.52k]
  |  |  |  |  |  Branch (872:49): [True: 7.90k, False: 9.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  12.9k|      break;
  374|  7.90k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.90k|#  define MINBPC(enc) 2
  ------------------
  375|  7.90k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.90k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.90k|    {                                                                          \
  |  |  |  |  135|  7.90k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.90k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  7.90k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 7.90k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  7.90k|    }
  |  |  ------------------
  ------------------
  376|  7.90k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  7.90k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  7.90k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.54k, False: 1.36k]
  |  |  |  |  |  Branch (872:49): [True: 477, False: 6.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  7.42k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  7.42k|#  define MINBPC(enc) 2
  ------------------
  378|  7.42k|      break;
  379|  7.42k|    }
  380|    477|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    477|#  define MINBPC(enc) 2
  ------------------
  381|    477|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    477|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  13.2k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 13.2k, False: 61.9k]
  ------------------
  383|  13.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.2k|#  define MINBPC(enc) 2
  ------------------
  384|  13.2k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.2k|    {                                                                          \
  |  |  |  |  135|  13.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  13.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 13.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  13.2k|    }
  |  |  ------------------
  ------------------
  385|  13.2k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  13.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  13.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 10.4k, False: 2.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 331, False: 12.9k]
  ------------------
  386|    331|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    331|#  define MINBPC(enc) 2
  ------------------
  387|  13.2k|    *nextTokPtr = ptr;
  388|  13.2k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  13.2k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  18.7k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 18.7k, False: 56.4k]
  ------------------
  390|  18.7k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  18.7k|#  define MINBPC(enc) 2
  ------------------
  391|  18.7k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  18.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  31.4k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 75.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: 75.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|  15.6k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  15.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 15.6k, False: 59.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|  15.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 37, False: 15.6k]
  |  |  |  |  ------------------
  |  |  |  |   51|  15.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     37|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  15.6k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  15.6k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  15.6k|    ptr += n;                                                                  \
  |  |  |  |   57|  15.6k|    break;
  |  |  ------------------
  |  |   63|  15.6k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 51, False: 75.1k]
  |  |  ------------------
  |  |   64|     51|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 75.2k]
  |  |  ------------------
  |  |   65|     58|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 75.1k]
  |  |  ------------------
  |  |   66|     58|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     58|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     58|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  6.63k|  default:
  ------------------
  |  Branch (393:3): [True: 6.63k, False: 68.5k]
  ------------------
  394|  6.63k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.63k|#  define MINBPC(enc) 2
  ------------------
  395|  6.63k|    break;
  396|  75.2k|  }
  397|  1.49M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.49M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.49M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.49M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   106k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 106k, False: 1.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|      0|      LEAD_CASE(2)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 1.49M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  408|      0|      LEAD_CASE(3)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 1.49M]
  |  |  ------------------
  |  |  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|  60.3k|      LEAD_CASE(4)
  ------------------
  |  |  400|  60.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 60.3k, False: 1.43M]
  |  |  ------------------
  |  |  401|  60.3k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  60.2k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 34, False: 60.2k]
  |  |  ------------------
  |  |  402|     34|      *nextTokPtr = ptr;                                                       \
  |  |  403|     34|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     34|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     34|    }                                                                          \
  |  |  405|  60.2k|    ptr += n;                                                                  \
  |  |  406|  60.2k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     46|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 46, False: 1.49M]
  ------------------
  412|     46|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.49M]
  ------------------
  413|     51|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 5, False: 1.49M]
  ------------------
  414|  10.9k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 10.8k, False: 1.48M]
  ------------------
  415|  29.4k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 18.5k, False: 1.47M]
  ------------------
  416|  42.4k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 13.0k, False: 1.48M]
  ------------------
  417|  42.4k|      *nextTokPtr = ptr;
  418|  42.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  42.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.39M|    default:
  ------------------
  |  Branch (419:5): [True: 1.39M, False: 102k]
  ------------------
  420|  1.39M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.39M|#  define MINBPC(enc) 2
  ------------------
  421|  1.39M|      break;
  422|  1.49M|    }
  423|  1.49M|  }
  424|    135|  *nextTokPtr = ptr;
  425|    135|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    135|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  42.6k|}
xmltok.c:big2_attributeValueTok:
 1262|   142k|                          const char **nextTokPtr) {
 1263|   142k|  const char *start;
 1264|   142k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 3.42k, False: 138k]
  ------------------
 1265|  3.42k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.42k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   138k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   138k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   138k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   138k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 138k]
  ------------------
 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|   138k|  start = ptr;
 1275|  4.29M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  4.29M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.29M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.29M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   204k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 204k, False: 4.09M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.29M]
  |  |  ------------------
  |  | 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.29M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  27.1k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  27.1k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 27.1k, False: 4.27M]
  |  |  ------------------
  |  | 1279|  27.1k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  27.1k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  73.7k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 73.7k, False: 4.22M]
  ------------------
 1286|  73.7k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 50.2k, False: 23.4k]
  ------------------
 1287|  50.2k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  50.2k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  50.2k|#  define MINBPC(enc) 2
  ------------------
 1288|  23.4k|      *nextTokPtr = ptr;
 1289|  23.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  23.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 4.29M]
  ------------------
 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|  4.71k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 4.71k, False: 4.29M]
  ------------------
 1295|  4.71k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 2.48k, False: 2.22k]
  ------------------
 1296|  2.48k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.48k|#  define MINBPC(enc) 2
  ------------------
 1297|  2.48k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.48k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  2.48k|      }
 1299|  2.22k|      *nextTokPtr = ptr;
 1300|  2.22k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.22k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  50.4k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 50.4k, False: 4.24M]
  ------------------
 1302|  50.4k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 27.3k, False: 23.1k]
  ------------------
 1303|  27.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  27.3k|#  define MINBPC(enc) 2
  ------------------
 1304|  27.3k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  27.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  27.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  27.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 708, False: 26.5k]
  ------------------
 1305|    708|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    708|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  26.5k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  26.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  26.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.6k, False: 10.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 599, False: 25.9k]
  ------------------
 1307|    599|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    599|#  define MINBPC(enc) 2
  ------------------
 1308|  26.5k|        *nextTokPtr = ptr;
 1309|  26.5k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  26.5k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  27.3k|      }
 1311|  23.1k|      *nextTokPtr = ptr;
 1312|  23.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  23.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  8.33k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 8.33k, False: 4.28M]
  ------------------
 1314|  8.33k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 5.80k, False: 2.52k]
  ------------------
 1315|  5.80k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.80k|#  define MINBPC(enc) 2
  ------------------
 1316|  5.80k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  5.80k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  5.80k|      }
 1318|  2.52k|      *nextTokPtr = ptr;
 1319|  2.52k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.52k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  4.13M|    default:
  ------------------
  |  Branch (1320:5): [True: 4.13M, False: 164k]
  ------------------
 1321|  4.13M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.13M|#  define MINBPC(enc) 2
  ------------------
 1322|  4.13M|      break;
 1323|  4.29M|    }
 1324|  4.29M|  }
 1325|  1.38k|  *nextTokPtr = ptr;
 1326|  1.38k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.38k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   138k|}
xmltok.c:big2_entityValueTok:
 1331|  50.2k|                       const char **nextTokPtr) {
 1332|  50.2k|  const char *start;
 1333|  50.2k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.77k, False: 48.4k]
  ------------------
 1334|  1.77k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.77k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  48.4k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  48.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  48.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  48.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 48.4k]
  ------------------
 1336|       |    /* This line cannot be executed.  The incoming data has already
 1337|       |     * been tokenized once, so incomplete characters like this have
 1338|       |     * already been eliminated from the input.  Retaining the paranoia
 1339|       |     * check is still valuable, however.
 1340|       |     */
 1341|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1342|      0|  }
 1343|  48.4k|  start = ptr;
 1344|  25.0M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  25.0M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  25.0M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  25.0M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   162k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 162k, False: 24.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 25.0M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1351|      0|      LEAD_CASE(3)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 25.0M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  32.0k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  32.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 32.0k, False: 25.0M]
  |  |  ------------------
  |  | 1348|  32.0k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  32.0k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  4.67k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 4.67k, False: 25.0M]
  ------------------
 1355|  4.67k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 2.74k, False: 1.93k]
  ------------------
 1356|  2.74k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.74k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.74k|#  define MINBPC(enc) 2
  ------------------
 1357|  1.93k|      *nextTokPtr = ptr;
 1358|  1.93k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.93k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      7|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 7, False: 25.0M]
  ------------------
 1360|      7|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 4, False: 3]
  ------------------
 1361|      4|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      4|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      4|#  define MINBPC(enc) 2
  ------------------
 1362|      4|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      4|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 3]
  ------------------
 1363|      4|      }
 1364|      3|      *nextTokPtr = ptr;
 1365|      3|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      3|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  12.1k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 12.1k, False: 25.0M]
  ------------------
 1367|  12.1k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 6.18k, False: 5.94k]
  ------------------
 1368|  6.18k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.18k|#  define MINBPC(enc) 2
  ------------------
 1369|  6.18k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.18k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  6.18k|      }
 1371|  5.94k|      *nextTokPtr = ptr;
 1372|  5.94k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.94k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  30.4k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 30.4k, False: 25.0M]
  ------------------
 1374|  30.4k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 16.9k, False: 13.4k]
  ------------------
 1375|  16.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  16.9k|#  define MINBPC(enc) 2
  ------------------
 1376|  16.9k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  16.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  16.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  16.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 112, False: 16.8k]
  ------------------
 1377|    112|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    112|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  16.8k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  16.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  16.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.5k, False: 4.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 424, False: 16.4k]
  ------------------
 1379|    424|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    424|#  define MINBPC(enc) 2
  ------------------
 1380|  16.8k|        *nextTokPtr = ptr;
 1381|  16.8k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  16.8k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  16.9k|      }
 1383|  13.4k|      *nextTokPtr = ptr;
 1384|  13.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  13.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  24.9M|    default:
  ------------------
  |  Branch (1385:5): [True: 24.9M, False: 79.2k]
  ------------------
 1386|  24.9M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  24.9M|#  define MINBPC(enc) 2
  ------------------
 1387|  24.9M|      break;
 1388|  25.0M|    }
 1389|  25.0M|  }
 1390|  1.27k|  *nextTokPtr = ptr;
 1391|  1.27k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.27k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  48.4k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  15.3k|                         const char *end1, const char *ptr2) {
 1716|  15.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  15.3k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  63.0k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  47.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 55.6k, False: 7.41k]
  ------------------
 1718|  55.6k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  55.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 23, False: 55.6k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     23|      return 0; /* LCOV_EXCL_LINE */
 1725|     23|    }
 1726|  55.6k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  55.6k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  55.6k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 55.5k, False: 31]
  |  |  |  |  |  Branch (872:49): [True: 47.7k, False: 7.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  7.86k|      return 0;
 1728|  55.6k|  }
 1729|  7.41k|  return ptr1 == end1;
 1730|  15.3k|}
xmltok.c:big2_nameLength:
 1733|  16.4k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  16.4k|  const char *start = ptr;
 1735|  77.0k|  for (;;) {
 1736|  77.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  77.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  77.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  31.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 31.9k, False: 45.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|      0|      LEAD_CASE(2)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 77.0k]
  |  |  ------------------
  |  | 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: 77.0k]
  |  |  ------------------
  |  | 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: 77.0k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  45.0k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 45.0k, False: 31.9k]
  ------------------
 1746|  54.7k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 9.64k, False: 67.3k]
  ------------------
 1747|  54.7k|#  ifdef XML_NS
 1748|  54.7k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 77.0k]
  ------------------
 1749|  54.7k|#  endif
 1750|  60.3k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 5.66k, False: 71.3k]
  ------------------
 1751|  60.4k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 97, False: 76.9k]
  ------------------
 1752|  60.4k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 12, False: 76.9k]
  ------------------
 1753|  60.5k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 66, False: 76.9k]
  ------------------
 1754|  60.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  60.5k|#  define MINBPC(enc) 2
  ------------------
 1755|  60.5k|      break;
 1756|  16.4k|    default:
  ------------------
  |  Branch (1756:5): [True: 16.4k, False: 60.5k]
  ------------------
 1757|  16.4k|      return (int)(ptr - start);
 1758|  77.0k|    }
 1759|  77.0k|  }
 1760|  16.4k|}
xmltok.c:big2_getAtts:
 1510|  10.8k|                ATTRIBUTE *atts) {
 1511|  10.8k|  enum { other, inName, inValue } state = inName;
 1512|  10.8k|  int nAtts = 0;
 1513|  10.8k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  9.67M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.8k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  9.66M|#  define MINBPC(enc) 2
  ------------------
 1517|  9.67M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  9.67M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  9.67M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.33M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.33M, False: 8.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.67M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.67M]
  |  |  ------------------
  |  | 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|  50.9k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  50.9k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 50.9k, False: 9.62M]
  |  |  ------------------
  |  | 1528|  50.9k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  50.9k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 50.9k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|  50.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  50.9k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  8.28M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 8.28M, False: 1.38M]
  ------------------
 1535|  8.49M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 209k, False: 9.46M]
  ------------------
 1536|  8.60M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 104k, False: 9.56M]
  ------------------
 1537|  8.60M|      START_NAME
  ------------------
  |  | 1519|  8.60M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 177k, False: 8.42M]
  |  |  ------------------
  |  | 1520|   177k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 92.1k, False: 85.2k]
  |  |  ------------------
  |  | 1521|  92.1k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|  92.1k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|  92.1k|      }                                                                        \
  |  | 1524|   177k|      state = inName;                                                          \
  |  | 1525|   177k|    }
  ------------------
 1538|  8.60M|      break;
 1539|      0|#  undef START_NAME
 1540|   304k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 304k, False: 9.36M]
  ------------------
 1541|   304k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 151k, False: 153k]
  ------------------
 1542|   151k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 76.4k, False: 74.7k]
  ------------------
 1543|  76.4k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  76.4k|#  define MINBPC(enc) 2
  ------------------
 1544|   151k|        state = inValue;
 1545|   151k|        open = BT_QUOT;
 1546|   153k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 151k, False: 2.13k]
  ------------------
 1547|   151k|        state = other;
 1548|   151k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 76.4k, False: 74.7k]
  ------------------
 1549|  76.4k|          atts[nAtts].valueEnd = ptr;
 1550|   151k|        nAtts++;
 1551|   151k|      }
 1552|   304k|      break;
 1553|  52.7k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 52.7k, False: 9.61M]
  ------------------
 1554|  52.7k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 26.1k, False: 26.5k]
  ------------------
 1555|  26.1k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 15.6k, False: 10.5k]
  ------------------
 1556|  15.6k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  15.6k|#  define MINBPC(enc) 2
  ------------------
 1557|  26.1k|        state = inValue;
 1558|  26.1k|        open = BT_APOS;
 1559|  26.5k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 26.1k, False: 395]
  ------------------
 1560|  26.1k|        state = other;
 1561|  26.1k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 15.6k, False: 10.5k]
  ------------------
 1562|  15.6k|          atts[nAtts].valueEnd = ptr;
 1563|  26.1k|        nAtts++;
 1564|  26.1k|      }
 1565|  52.7k|      break;
 1566|  54.1k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 54.1k, False: 9.61M]
  ------------------
 1567|  54.1k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 52.8k, False: 1.30k]
  ------------------
 1568|  52.8k|        atts[nAtts].normalized = 0;
 1569|  54.1k|      break;
 1570|  83.5k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 83.5k, False: 9.58M]
  ------------------
 1571|  83.5k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 3.40k, False: 80.1k]
  ------------------
 1572|  3.40k|        state = other;
 1573|  80.1k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 51.3k, False: 28.7k]
  |  Branch (1573:36): [True: 30.3k, False: 21.0k]
  |  Branch (1573:55): [True: 15.2k, False: 15.0k]
  ------------------
 1574|  80.1k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 2.09k, False: 13.1k]
  ------------------
 1575|  15.2k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|  13.1k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  13.1k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 13.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  28.3k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 911, False: 12.2k]
  ------------------
 1576|  15.2k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|  12.2k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  12.2k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 8.67k, False: 3.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  27.4k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 5.07k, False: 7.13k]
  ------------------
 1577|  15.2k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  7.13k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.13k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.59k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.59k, False: 3.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 2.13k, False: 4.99k]
  ------------------
 1578|  10.2k|        atts[nAtts].normalized = 0;
 1579|  83.5k|      break;
 1580|  42.7k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 42.7k, False: 9.62M]
  ------------------
 1581|   203k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 160k, False: 9.51M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   203k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.63k, False: 200k]
  ------------------
 1585|  2.63k|        state = other;
 1586|   200k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 49.4k, False: 151k]
  |  Branch (1586:36): [True: 40.6k, False: 8.73k]
  ------------------
 1587|  40.6k|        atts[nAtts].normalized = 0;
 1588|   203k|      break;
 1589|  29.5k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 29.5k, False: 9.64M]
  ------------------
 1590|  32.5k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 2.99k, False: 9.66M]
  ------------------
 1591|  32.5k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 10.8k, False: 21.6k]
  ------------------
 1592|  10.8k|        return nAtts;
 1593|  21.6k|      break;
 1594|   287k|    default:
  ------------------
  |  Branch (1594:5): [True: 287k, False: 9.38M]
  ------------------
 1595|   287k|      break;
 1596|  9.67M|    }
 1597|  9.67M|  }
 1598|       |  /* not reached */
 1599|  10.8k|}
xmltok.c:big2_charRefNumber:
 1602|  4.74k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  4.74k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  4.74k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.74k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  4.74k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  4.74k|#  define MINBPC(enc) 2
  ------------------
 1607|  4.74k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  4.74k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.74k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.74k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 3.73k, False: 1.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  18.3k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  3.73k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  18.3k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  18.3k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 18.3k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 3.71k, False: 14.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  14.6k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  14.6k|#  define MINBPC(enc) 2
  ------------------
 1610|  14.6k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  14.6k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  14.6k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 14.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  14.6k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 14.6k]
  ------------------
 1612|    398|      case ASCII_0:
  ------------------
  |  |   90|    398|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 398, False: 14.2k]
  ------------------
 1613|  1.15k|      case ASCII_1:
  ------------------
  |  |   91|  1.15k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 756, False: 13.8k]
  ------------------
 1614|  1.64k|      case ASCII_2:
  ------------------
  |  |   92|  1.64k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 491, False: 14.1k]
  ------------------
 1615|  2.25k|      case ASCII_3:
  ------------------
  |  |   93|  2.25k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 606, False: 14.0k]
  ------------------
 1616|  3.25k|      case ASCII_4:
  ------------------
  |  |   94|  3.25k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 1.00k, False: 13.6k]
  ------------------
 1617|  5.76k|      case ASCII_5:
  ------------------
  |  |   95|  5.76k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 2.50k, False: 12.1k]
  ------------------
 1618|  6.46k|      case ASCII_6:
  ------------------
  |  |   96|  6.46k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 697, False: 13.9k]
  ------------------
 1619|  6.76k|      case ASCII_7:
  ------------------
  |  |   97|  6.76k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 306, False: 14.3k]
  ------------------
 1620|  7.46k|      case ASCII_8:
  ------------------
  |  |   98|  7.46k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 694, False: 13.9k]
  ------------------
 1621|  8.16k|      case ASCII_9:
  ------------------
  |  |   99|  8.16k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 703, False: 13.9k]
  ------------------
 1622|  8.16k|        result <<= 4;
 1623|  8.16k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  8.16k|#define ASCII_0 0x30
  ------------------
 1624|  8.16k|        break;
 1625|    138|      case ASCII_A:
  ------------------
  |  |   36|    138|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 138, False: 14.5k]
  ------------------
 1626|    553|      case ASCII_B:
  ------------------
  |  |   37|    553|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 415, False: 14.2k]
  ------------------
 1627|    628|      case ASCII_C:
  ------------------
  |  |   38|    628|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 75, False: 14.5k]
  ------------------
 1628|  1.35k|      case ASCII_D:
  ------------------
  |  |   39|  1.35k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 730, False: 13.9k]
  ------------------
 1629|  1.57k|      case ASCII_E:
  ------------------
  |  |   40|  1.57k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 216, False: 14.4k]
  ------------------
 1630|  3.76k|      case ASCII_F:
  ------------------
  |  |   41|  3.76k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 2.19k, False: 12.4k]
  ------------------
 1631|  3.76k|        result <<= 4;
 1632|  3.76k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.76k|#define ASCII_A 0x41
  ------------------
 1633|  3.76k|        break;
 1634|    497|      case ASCII_a:
  ------------------
  |  |   63|    497|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 497, False: 14.1k]
  ------------------
 1635|    697|      case ASCII_b:
  ------------------
  |  |   64|    697|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 200, False: 14.4k]
  ------------------
 1636|  1.00k|      case ASCII_c:
  ------------------
  |  |   65|  1.00k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 305, False: 14.3k]
  ------------------
 1637|  1.91k|      case ASCII_d:
  ------------------
  |  |   66|  1.91k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 909, False: 13.7k]
  ------------------
 1638|  2.18k|      case ASCII_e:
  ------------------
  |  |   67|  2.18k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 277, False: 14.3k]
  ------------------
 1639|  2.71k|      case ASCII_f:
  ------------------
  |  |   68|  2.71k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 523, False: 14.1k]
  ------------------
 1640|  2.71k|        result <<= 4;
 1641|  2.71k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  2.71k|#define ASCII_a 0x61
  ------------------
 1642|  2.71k|        break;
 1643|  14.6k|      }
 1644|  14.6k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 20, False: 14.6k]
  ------------------
 1645|     20|        return -1;
 1646|  14.6k|    }
 1647|  3.73k|  } else {
 1648|  4.27k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  4.27k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.27k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.27k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1.00k, False: 3.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.26k|#  define MINBPC(enc) 2
  ------------------
 1649|  3.26k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  3.26k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.26k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.26k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  3.26k|      result *= 10;
 1651|  3.26k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.26k|#define ASCII_0 0x30
  ------------------
 1652|  3.26k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 1, False: 3.26k]
  ------------------
 1653|      1|        return -1;
 1654|  3.26k|    }
 1655|  1.01k|  }
 1656|  4.72k|  return checkCharRefNumber(result);
 1657|  4.74k|}
xmltok.c:big2_predefinedEntityName:
 1661|  60.7k|                             const char *end) {
 1662|  60.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  60.7k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  60.7k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|  60.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 52.0k, False: 8.61k]
  ------------------
 1664|  1.51k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.51k, False: 59.1k]
  ------------------
 1665|  1.51k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  1.51k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.51k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 998, False: 518]
  |  |  |  |  |  Branch (872:49): [True: 701, False: 297]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    701|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    701|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    701|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 334, False: 367]
  |  |  |  |  |  Branch (871:32): [True: 386, False: 315]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    363|      case ASCII_l:
  ------------------
  |  |   74|    363|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 363, False: 338]
  ------------------
 1668|    363|        return ASCII_LT;
  ------------------
  |  |  111|    363|#define ASCII_LT 0x3C
  ------------------
 1669|      4|      case ASCII_g:
  ------------------
  |  |   69|      4|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 4, False: 697]
  ------------------
 1670|      4|        return ASCII_GT;
  ------------------
  |  |  113|      4|#define ASCII_GT 0x3E
  ------------------
 1671|    701|      }
 1672|    701|    }
 1673|  1.14k|    break;
 1674|  1.62k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.62k, False: 59.0k]
  ------------------
 1675|  1.62k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.62k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.62k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.38k, False: 242]
  |  |  |  |  |  Branch (872:49): [True: 1.15k, False: 225]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.15k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.15k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.15k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.15k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.15k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 937, False: 219]
  |  |  |  |  |  Branch (872:49): [True: 451, False: 486]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    451|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    451|#  define MINBPC(enc) 2
  ------------------
 1679|    451|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    451|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    451|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 245, False: 206]
  |  |  |  |  |  Branch (872:49): [True: 195, False: 50]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    195|          return ASCII_AMP;
  ------------------
  |  |  105|    195|#define ASCII_AMP 0x26
  ------------------
 1681|    451|      }
 1682|  1.15k|    }
 1683|  1.42k|    break;
 1684|  5.47k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 5.47k, False: 55.2k]
  ------------------
 1685|  5.47k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  5.47k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  5.47k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 585, False: 4.89k]
  |  |  |  |  |  Branch (871:32): [True: 5.13k, False: 348]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.94k|    case ASCII_q:
  ------------------
  |  |   79|  1.94k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.94k, False: 3.53k]
  ------------------
 1687|  1.94k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.94k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.94k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  1.94k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.94k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.74k, False: 201]
  |  |  |  |  |  Branch (872:49): [True: 1.35k, False: 389]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.35k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.35k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.35k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.35k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.35k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.25k, False: 101]
  |  |  |  |  |  Branch (872:49): [True: 803, False: 449]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    803|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    803|#  define MINBPC(enc) 2
  ------------------
 1692|    803|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|    803|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    803|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 587, False: 216]
  |  |  |  |  |  Branch (872:49): [True: 571, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    571|            return ASCII_QUOT;
  ------------------
  |  |  104|    571|#define ASCII_QUOT 0x22
  ------------------
 1694|    803|        }
 1695|  1.35k|      }
 1696|  1.37k|      break;
 1697|  2.95k|    case ASCII_a:
  ------------------
  |  |   63|  2.95k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 2.95k, False: 2.52k]
  ------------------
 1698|  2.95k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.95k|#  define MINBPC(enc) 2
  ------------------
 1699|  2.95k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  2.95k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.95k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.84k, False: 101]
  |  |  |  |  |  Branch (872:49): [True: 2.33k, False: 519]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  2.33k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.33k|#  define MINBPC(enc) 2
  ------------------
 1701|  2.33k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  2.33k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.33k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.13k, False: 193]
  |  |  |  |  |  Branch (872:49): [True: 2.05k, False: 83]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  2.05k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.05k|#  define MINBPC(enc) 2
  ------------------
 1703|  2.05k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|  2.05k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.05k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.83k, False: 216]
  |  |  |  |  |  Branch (872:49): [True: 34, False: 1.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|     34|            return ASCII_APOS;
  ------------------
  |  |  106|     34|#define ASCII_APOS 0x27
  ------------------
 1705|  2.05k|        }
 1706|  2.33k|      }
 1707|  2.91k|      break;
 1708|  5.47k|    }
 1709|  60.7k|  }
 1710|  59.5k|  return 0;
 1711|  60.7k|}
xmltok.c:big2_updatePosition:
 1779|  2.75k|                       POSITION *pos) {
 1780|  5.00M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  5.00M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.00M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.00M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   378k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 378k, False: 4.62M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 5.00M]
  |  |  ------------------
  |  | 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: 5.00M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   115k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   115k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 115k, False: 4.89M]
  |  |  ------------------
  |  | 1784|   115k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   115k|    pos->columnNumber++;                                                       \
  |  | 1786|   115k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  30.4k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 30.4k, False: 4.97M]
  ------------------
 1792|  30.4k|      pos->columnNumber = 0;
 1793|  30.4k|      pos->lineNumber++;
 1794|  30.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  30.4k|#  define MINBPC(enc) 2
  ------------------
 1795|  30.4k|      break;
 1796|  36.7k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 36.7k, False: 4.97M]
  ------------------
 1797|  36.7k|      pos->lineNumber++;
 1798|  36.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  36.7k|#  define MINBPC(enc) 2
  ------------------
 1799|  36.7k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  36.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  73.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  36.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 36.7k, False: 42]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  36.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  36.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 26.7k, False: 9.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.77k, False: 34.9k]
  ------------------
 1800|  1.77k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.77k|#  define MINBPC(enc) 2
  ------------------
 1801|  36.7k|      pos->columnNumber = 0;
 1802|  36.7k|      break;
 1803|  4.82M|    default:
  ------------------
  |  Branch (1803:5): [True: 4.82M, False: 182k]
  ------------------
 1804|  4.82M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.82M|#  define MINBPC(enc) 2
  ------------------
 1805|  4.82M|      pos->columnNumber++;
 1806|  4.82M|      break;
 1807|  5.00M|    }
 1808|  5.00M|  }
 1809|  2.75k|}
xmltok.c:big2_isPublicId:
 1450|    639|                   const char **badPtr) {
 1451|    639|  ptr += MINBPC(enc);
  ------------------
  |  |  916|    639|#  define MINBPC(enc) 2
  ------------------
 1452|    639|  end -= MINBPC(enc);
  ------------------
  |  |  916|    639|#  define MINBPC(enc) 2
  ------------------
 1453|  11.1k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  11.1k|#  define MINBPC(enc) 2
  ------------------
 1454|  11.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  11.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  11.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.1k, False: 39]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    827|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 827, False: 10.3k]
  ------------------
 1456|  2.29k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 1.47k, False: 9.69k]
  ------------------
 1457|  2.73k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 434, False: 10.7k]
  ------------------
 1458|  3.10k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 376, False: 10.7k]
  ------------------
 1459|  3.40k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 291, False: 10.8k]
  ------------------
 1460|  3.66k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 268, False: 10.9k]
  ------------------
 1461|  4.03k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 368, False: 10.8k]
  ------------------
 1462|  4.14k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 113, False: 11.0k]
  ------------------
 1463|  4.36k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 211, False: 10.9k]
  ------------------
 1464|  4.69k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 333, False: 10.8k]
  ------------------
 1465|  5.07k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 386, False: 10.7k]
  ------------------
 1466|  5.45k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 376, False: 10.7k]
  ------------------
 1467|  5.79k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 343, False: 10.8k]
  ------------------
 1468|  6.04k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 250, False: 10.9k]
  ------------------
 1469|  6.32k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 273, False: 10.8k]
  ------------------
 1470|  6.54k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 221, False: 10.9k]
  ------------------
 1471|  6.90k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 361, False: 10.8k]
  ------------------
 1472|  7.35k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 450, False: 10.7k]
  ------------------
 1473|  7.35k|#  ifdef XML_NS
 1474|  7.35k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 11.1k]
  ------------------
 1475|  7.35k|#  endif
 1476|  7.35k|      break;
 1477|    650|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 650, False: 10.5k]
  ------------------
 1478|    650|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|    650|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    650|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 650, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 649]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    649|      break;
 1483|    649|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 219, False: 10.9k]
  ------------------
 1484|  2.47k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 2.26k, False: 8.90k]
  ------------------
 1485|  2.47k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|  2.47k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.47k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.47k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 2.46k, False: 13]
  ------------------
 1486|  2.46k|        break;
 1487|       |      /* fall through */
 1488|    700|    default:
  ------------------
  |  Branch (1488:5): [True: 687, False: 10.4k]
  ------------------
 1489|    700|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    700|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    700|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 661, False: 39]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    348|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 348, False: 352]
  ------------------
 1491|    641|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 293, False: 407]
  ------------------
 1492|    641|        break;
 1493|     59|      default:
  ------------------
  |  Branch (1493:7): [True: 59, False: 641]
  ------------------
 1494|     59|        *badPtr = ptr;
 1495|     59|        return 0;
 1496|    700|      }
 1497|    641|      break;
 1498|  11.1k|    }
 1499|  11.1k|  }
 1500|    579|  return 1;
 1501|    639|}

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

